From 8ee52bc834c6eecda7bfd54cc0549f72ddc60121 Mon Sep 17 00:00:00 2001 From: dzfelix Date: Thu, 22 Aug 2024 17:19:22 +0300 Subject: [PATCH] blog fix cat link --- src/app/[locale]/blog/[slug]/page.tsx | 8 ++++---- src/components/BlogPosts/BlogPostsList.tsx | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/app/[locale]/blog/[slug]/page.tsx b/src/app/[locale]/blog/[slug]/page.tsx index fe5f562..2f6aefd 100644 --- a/src/app/[locale]/blog/[slug]/page.tsx +++ b/src/app/[locale]/blog/[slug]/page.tsx @@ -27,20 +27,20 @@ export async function generateMetadata({ params }: BlogPostPageProps, parent: Re } -function renderWidget (widget: Widget) { +function renderWidget (widget: Widget, index: number) { switch (widget.type){ case 'widgetParagraph': return ( - <> +

{widget.widget.subTitle}

- +
) case 'widgetMedia': return ( - + ) } } diff --git a/src/components/BlogPosts/BlogPostsList.tsx b/src/components/BlogPosts/BlogPostsList.tsx index 70f85da..954402d 100644 --- a/src/components/BlogPosts/BlogPostsList.tsx +++ b/src/components/BlogPosts/BlogPostsList.tsx @@ -13,7 +13,8 @@ type Props = { basePath: string; locale: string; data: BlogPost[], - total: number + total: number, + pageSize: number }; export const BlogPostsList = ({ basePath = '/', locale, pageSize = DEFAULT_PAGE_SIZE, data = [], total= 0 }: Props) => { @@ -28,7 +29,7 @@ export const BlogPostsList = ({ basePath = '/', locale, pageSize = DEFAULT_PAGE
{data.map((item, i) => (
  • - +
    {item.listImage?.alt}/