From dd2a3b3a07a2a2bc2c0bb56798b2bfe537e157ab Mon Sep 17 00:00:00 2001 From: jongse7 Date: Thu, 26 Sep 2024 19:40:44 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B3=B5=EC=A7=80=EC=82=AC=ED=95=AD=20?= =?UTF-8?q?=EA=B2=8C=EC=8B=9C=EA=B8=80=20new=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/PostCard/PostCardBasicMissing.tsx | 2 +- src/pages/notice/component/NoticeContent.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/PostCard/PostCardBasicMissing.tsx b/src/components/PostCard/PostCardBasicMissing.tsx index 0d04cdab..ee21ec84 100644 --- a/src/components/PostCard/PostCardBasicMissing.tsx +++ b/src/components/PostCard/PostCardBasicMissing.tsx @@ -11,7 +11,7 @@ interface PostCardProps { title?: string; subtitle?: string; date?: string; - badgeType?: string; + badgeType?: 'Emergency' | 'New' | 'Default'; cardType: 'Basic' | 'Missing'; size?: Size; profileImg?: string | null; diff --git a/src/pages/notice/component/NoticeContent.tsx b/src/pages/notice/component/NoticeContent.tsx index 373af226..ac74cef0 100644 --- a/src/pages/notice/component/NoticeContent.tsx +++ b/src/pages/notice/component/NoticeContent.tsx @@ -90,10 +90,10 @@ export function NoticeContent({ initPosts, isLoading }: NoticeContentProps) { function RenderCard({ post, size }: RenderCardProps) { const formattedDate = post.date ? formatYYYYMMDD(post.date) : ''; - let status; - if (status === '긴급공지') { + let status: 'Emergency' | 'New' | 'Default'; + if (post.status === '긴급공지') { status = 'Emergency'; - } else if (status === '새로운') { + } else if (post.status === '새로운') { status = 'New'; } else { status = 'Default';