diff --git a/src/app/newsletter/page.tsx b/src/app/newsletter/page.tsx index 5cf44bb..56bdab5 100644 --- a/src/app/newsletter/page.tsx +++ b/src/app/newsletter/page.tsx @@ -58,6 +58,7 @@ const Page = () => { content={item.content} id={item.id} imageUrl={item.imageUrl} + path="newsletter" publishedAt={item.publishedAt.split('T')[0]} title={item.title} /> @@ -70,6 +71,7 @@ const Page = () => { content={filteredItem.content} id={filteredItem.id} imageUrl={filteredItem.imageUrl} + path="newsletter" publishedAt={filteredItem.publishedAt.split('T')[0]} title={filteredItem.title} /> diff --git a/src/app/village/[id]/page.tsx b/src/app/village/[id]/page.tsx index 80ae66c..f3ede73 100644 --- a/src/app/village/[id]/page.tsx +++ b/src/app/village/[id]/page.tsx @@ -12,7 +12,7 @@ import color from '@/constants/color'; import hiddenGems from '@/mocks/villages'; const Page = async ({ params }: { params: { id: number } }) => { - const village = hiddenGems[params.id]; + const village = hiddenGems[params.id - 1]; return ( diff --git a/src/app/village/page.tsx b/src/app/village/page.tsx index 8a6be76..e3b9817 100644 --- a/src/app/village/page.tsx +++ b/src/app/village/page.tsx @@ -39,7 +39,9 @@ const Page = () => { @@ -58,6 +60,7 @@ const Page = () => { content={filteredItem.content} id={filteredItem.id} imageUrl={filteredItem.imageUrl} + path="village" publishedAt="2024-01-20" title={filteredItem.title} /> diff --git a/src/components/NewsCardHorizontal.tsx b/src/components/NewsCardHorizontal.tsx index 623f5bd..a69239f 100644 --- a/src/components/NewsCardHorizontal.tsx +++ b/src/components/NewsCardHorizontal.tsx @@ -10,16 +10,17 @@ interface NewsCardHorizontalProps { content: string; publishedAt: string; imageUrl?: string; + path: string; } -const NewsCardHorizontal = ({ id, title, content, publishedAt, imageUrl }: NewsCardHorizontalProps) => { +const NewsCardHorizontal = ({ id, title, content, publishedAt, imageUrl, path }: NewsCardHorizontalProps) => { return ( {publishedAt} - + { +const NewsCardVertical = ({ id, date, title, description, imageUrl, path }: NewsCardVerticalProps) => { return ( - {imageUrl && ( - - )} + + {imageUrl && ( + + )} + {date} @@ -43,6 +49,20 @@ const NewsCardVertical = ({ date, title, description, imageUrl }: NewsCardVertic {description} + {imageUrl && ( + + articleImage + + )} ); };