Compare commits
No commits in common. "dbb74b9ccd67d0e6b17ad595275cb1416fddfa09" and "2f2d9db82a15793ba705c685d08ad7a5493d527d" have entirely different histories.
dbb74b9ccd
...
2f2d9db82a
|
@ -27,20 +27,20 @@ export async function generateMetadata({ params }: BlogPostPageProps, parent: Re
|
|||
}
|
||||
|
||||
|
||||
function renderWidget (widget: Widget, index: number) {
|
||||
function renderWidget (widget: Widget) {
|
||||
switch (widget.type){
|
||||
case 'widgetParagraph':
|
||||
return (
|
||||
<div key={'widget'+index} >
|
||||
<>
|
||||
<h2 className="title-h2">
|
||||
{widget.widget.subTitle}
|
||||
</h2>
|
||||
<RichText document={widget.widget.body} />
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
case 'widgetMedia':
|
||||
return (
|
||||
<img key={'widget'+index} src={widget.widget.file?.src}/>
|
||||
<img src={widget.widget.file?.src}/>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,8 +13,7 @@ type Props = {
|
|||
basePath: string;
|
||||
locale: string;
|
||||
data: BlogPost[],
|
||||
total: number,
|
||||
pageSize: number
|
||||
total: number
|
||||
};
|
||||
|
||||
export const BlogPostsList = ({ basePath = '/', locale, pageSize = DEFAULT_PAGE_SIZE, data = [], total= 0 }: Props) => {
|
||||
|
@ -29,7 +28,7 @@ export const BlogPostsList = ({ basePath = '/', locale, pageSize = DEFAULT_PAGE
|
|||
<div className="news-list">
|
||||
{data.map((item, i) => (
|
||||
<li key={'blog'+i} className="list-sidebar__item">
|
||||
<Link href={`/${locale}/blog/${item.slug}`} className="news-item">
|
||||
<Link href={`${item.slug}`} className="news-item">
|
||||
<div className="news-item__image">
|
||||
<img className="" src={item.listImage?.src} alt={item.listImage?.alt}/>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue