From 696c38911336789b8df762462f4870ca18c1eb7b Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 28 Mar 2024 00:27:49 +0800 Subject: [PATCH 1/2] fix: link --- src/entities/article/ui/blog-slider-layout/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/entities/article/ui/blog-slider-layout/index.tsx b/src/entities/article/ui/blog-slider-layout/index.tsx index b4b6da9..701728a 100644 --- a/src/entities/article/ui/blog-slider-layout/index.tsx +++ b/src/entities/article/ui/blog-slider-layout/index.tsx @@ -82,7 +82,7 @@ export const BlogSliderLayout: React.FC = ({ categoryName={item.category.name} timeToRead={item.timeToRead} createdAt={item.createdAt} - url={`/blog/${item.slug}`} + url={item.link} className={css.blog} /> From 13c841828d8273d548173fc4406939395ce1cd20 Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 28 Mar 2024 01:30:06 +0800 Subject: [PATCH 2/2] fix: date --- src/entities/article/ui/blog-slider-layout/index.tsx | 2 +- src/shared/lib/types/blog.ts | 1 + src/widgets/08-blog-screens/ui/02-blogs/index.tsx | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/entities/article/ui/blog-slider-layout/index.tsx b/src/entities/article/ui/blog-slider-layout/index.tsx index 701728a..2e95b24 100644 --- a/src/entities/article/ui/blog-slider-layout/index.tsx +++ b/src/entities/article/ui/blog-slider-layout/index.tsx @@ -81,7 +81,7 @@ export const BlogSliderLayout: React.FC = ({ title={item.title} categoryName={item.category.name} timeToRead={item.timeToRead} - createdAt={item.createdAt} + createdAt={item.date} url={item.link} className={css.blog} /> diff --git a/src/shared/lib/types/blog.ts b/src/shared/lib/types/blog.ts index 2799113..74b658c 100644 --- a/src/shared/lib/types/blog.ts +++ b/src/shared/lib/types/blog.ts @@ -6,6 +6,7 @@ export interface IBlog extends IBaseFields { title: string; slug: string; link: string; + date: string; timeToRead: string; category: IBlogCategory; image: IFileObject; diff --git a/src/widgets/08-blog-screens/ui/02-blogs/index.tsx b/src/widgets/08-blog-screens/ui/02-blogs/index.tsx index 9944c74..fe34058 100644 --- a/src/widgets/08-blog-screens/ui/02-blogs/index.tsx +++ b/src/widgets/08-blog-screens/ui/02-blogs/index.tsx @@ -64,7 +64,7 @@ export const Blogs: React.FC = () => { timeToRead={item.timeToRead} categoryName={item.category.name} imageSrc={item.image.url} - createdAt={item.createdAt} + createdAt={item.date} /> ))}