From 913f8f9afe32fef57c71d863ba82b9bfdd862d0f Mon Sep 17 00:00:00 2001 From: Lee sang Yeop Date: Fri, 5 Jan 2024 20:06:16 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat(Announcement):=20=EC=B1=84=EC=9A=A9=20?= =?UTF-8?q?=EA=B3=B5=EC=A7=80=EC=97=90=20=EB=8C=80=ED=95=9C=20=EB=9D=BC?= =?UTF-8?q?=EC=9A=B0=ED=8C=85=20=EA=B2=BD=EB=A1=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Announcement/index.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/pages/Announcement/index.tsx b/src/pages/Announcement/index.tsx index 1bc072b1..b9a8344b 100644 --- a/src/pages/Announcement/index.tsx +++ b/src/pages/Announcement/index.tsx @@ -44,6 +44,16 @@ const Announcement = () => { /> } /> + + } + /> ); }; From efaaf43479421d96ad5b90851d8e14ebc49737ea Mon Sep 17 00:00:00 2001 From: Lee sang Yeop Date: Fri, 5 Jan 2024 20:08:18 +0900 Subject: [PATCH 2/2] =?UTF-8?q?feat(Card/AnnounceCard):=20=EC=B1=84?= =?UTF-8?q?=EC=9A=A9=20=EA=B3=B5=EC=A7=80=EB=A5=BC=20=EB=B3=B4=EC=97=AC?= =?UTF-8?q?=EC=A3=BC=EA=B8=B0=20=EC=9C=84=ED=95=B4=20=EC=9D=BC=EB=B6=80=20?= =?UTF-8?q?=EA=B0=92=20=EC=88=98=EC=A0=95=20=EC=B1=84=EC=9A=A9=20=EA=B3=B5?= =?UTF-8?q?=EC=A7=80=EB=8A=94=20=EB=8B=A4=EB=A5=B8=20=EA=B3=B5=EC=A7=80?= =?UTF-8?q?=EC=99=80=EB=8A=94=20=EB=8B=A4=EB=A5=B4=EA=B2=8C=20=EA=B3=B5?= =?UTF-8?q?=EC=A7=80=20=EC=97=85=EB=A1=9C=EB=93=9C=20=EB=82=A0=EC=A7=9C?= =?UTF-8?q?=EA=B0=80=20=EC=95=84=EB=8B=8C=20=EC=B1=84=EC=9A=A9=20=EA=B8=B0?= =?UTF-8?q?=EA=B0=84=EC=9D=84=20=EB=B3=B4=EC=97=AC=EC=A3=BC=EA=B8=B0?= =?UTF-8?q?=EB=A1=9C=20=EA=B2=B0=EC=A0=95=ED=96=88=EA=B8=B0=EC=97=90=20?= =?UTF-8?q?=EB=82=A0=EC=A7=9C=EC=97=90=20=EB=8C=80=ED=95=9C=20=EB=B3=80?= =?UTF-8?q?=EC=88=98=EA=B0=92=EC=9D=B4=20=EB=8B=AC=EB=9D=BC=EC=9A=94=20?= =?UTF-8?q?=EA=B7=B8=EB=A0=87=EA=B8=B0=EC=97=90=20=ED=95=B4=EB=8B=B9=20?= =?UTF-8?q?=EB=B3=80=EC=88=98=EB=AA=85=EB=8F=84=20props=20=EB=A1=9C=20?= =?UTF-8?q?=EB=B0=9B=EC=95=84=20=EB=B3=B4=EC=97=AC=EC=A7=88=20=EC=88=98=20?= =?UTF-8?q?=EC=9E=88=EB=8F=84=EB=A1=9D=20=ED=95=98=EC=98=80=EA=B3=A0=20?= =?UTF-8?q?=EC=B1=84=EC=9A=A9=20=EA=B3=B5=EC=A7=80=EC=9D=98=20=EA=B2=BD?= =?UTF-8?q?=EC=9A=B0=20=EC=9E=91=EC=84=B1=EC=9E=90=EA=B0=80=20=EB=B3=B4?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EC=95=8A=EB=8F=84=EB=A1=9D=20=ED=96=88?= =?UTF-8?q?=EC=96=B4=EC=9A=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Card/AnnounceCard/index.tsx | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/components/Card/AnnounceCard/index.tsx b/src/components/Card/AnnounceCard/index.tsx index 42346fbd..2762352c 100644 --- a/src/components/Card/AnnounceCard/index.tsx +++ b/src/components/Card/AnnounceCard/index.tsx @@ -6,26 +6,36 @@ import openLink from '@utils/router/openLink'; interface AnnounceCardProps extends AnnounceItem { author?: string; + recruitment_period?: string; } const AnnounceCard = ({ title, link, uploadDate, + recruitment_period, author, }: AnnounceCardProps) => { const { major } = useMajor(); - uploadDate = uploadDate.slice(2); + const showDate = () => { + if (recruitment_period) return recruitment_period; + uploadDate = uploadDate.slice(2); + return `20${uploadDate}`; + }; return ( openLink(link)} data-testid="card"> {title} - 20{uploadDate} - - {author ? author : major} + {showDate()} + {!recruitment_period && ( + <> + + {author ? author : major} + + )}