From 49dee2a701201ec1279240619a606bd21694920a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=A7=80=EB=AF=BC?= <108014449+stopmin@users.noreply.github.com> Date: Wed, 24 Jul 2024 00:14:10 +0900 Subject: [PATCH] =?UTF-8?q?VerticalCard=20=EB=B2=84=EA=B7=B8=20=ED=94=BD?= =?UTF-8?q?=EC=8A=A4=20(#127)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: VerticalCard 버그 픽스 #126 * feat: 의존성 정리 #126 --- src/app/insight/page.tsx | 1 + src/components/NewsCardVertical.tsx | 96 ++++++++++++++--------------- 2 files changed, 48 insertions(+), 49 deletions(-) diff --git a/src/app/insight/page.tsx b/src/app/insight/page.tsx index 0960a89..104da90 100644 --- a/src/app/insight/page.tsx +++ b/src/app/insight/page.tsx @@ -102,6 +102,7 @@ const Page = () => { onClick={() => handleInsightClick(insight)} > { +const NewsCardVertical = ({ id, date, title, description, imageUrl, path, isMock = false }: NewsCardVerticalProps) => { + const cardContent = ( + <> + + {date} + + + {title} + + + {description} + + + ); + return ( - - {imageUrl && ( + {imageUrl && + (isMock ? ( - )} - + ) : ( + + + + ))} - - - {date} - - - {title} - - - {description} - - + {isMock ? ( + cardContent + ) : ( + + {cardContent} + + )} - {imageUrl && ( - - articleImage - - )} ); };