Compare commits

..

No commits in common. "dbb74b9ccd67d0e6b17ad595275cb1416fddfa09" and "2f2d9db82a15793ba705c685d08ad7a5493d527d" have entirely different histories.

2 changed files with 6 additions and 7 deletions

View File

@ -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){ switch (widget.type){
case 'widgetParagraph': case 'widgetParagraph':
return ( return (
<div key={'widget'+index} > <>
<h2 className="title-h2"> <h2 className="title-h2">
{widget.widget.subTitle} {widget.widget.subTitle}
</h2> </h2>
<RichText document={widget.widget.body} /> <RichText document={widget.widget.body} />
</div> </>
) )
case 'widgetMedia': case 'widgetMedia':
return ( return (
<img key={'widget'+index} src={widget.widget.file?.src}/> <img src={widget.widget.file?.src}/>
) )
} }
} }

View File

@ -13,8 +13,7 @@ type Props = {
basePath: string; basePath: string;
locale: string; locale: string;
data: BlogPost[], data: BlogPost[],
total: number, total: number
pageSize: number
}; };
export const BlogPostsList = ({ basePath = '/', locale, pageSize = DEFAULT_PAGE_SIZE, data = [], total= 0 }: Props) => { 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"> <div className="news-list">
{data.map((item, i) => ( {data.map((item, i) => (
<li key={'blog'+i} className="list-sidebar__item"> <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"> <div className="news-item__image">
<img className="" src={item.listImage?.src} alt={item.listImage?.alt}/> <img className="" src={item.listImage?.src} alt={item.listImage?.alt}/>
</div> </div>