From 93fba7479ba2d0c828a1e27240e9295db7d156b8 Mon Sep 17 00:00:00 2001 From: minbo Date: Fri, 13 Sep 2024 15:58:53 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EB=B0=98=EB=B3=B5=EB=90=98?= =?UTF-8?q?=EB=8A=94=20=EB=B6=80=EB=B6=84=20=EC=83=81=EC=88=98=ED=99=94?= =?UTF-8?q?=ED=95=98=EB=8A=94=20=EB=B0=A9=EB=B2=95=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CardApplicantStatusLabel.compoenent.tsx | 43 ++++++++++--------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/frontend/components/kanban/card/CardApplicantStatusLabel.compoenent.tsx b/frontend/components/kanban/card/CardApplicantStatusLabel.compoenent.tsx index 6024c39f..060d4015 100644 --- a/frontend/components/kanban/card/CardApplicantStatusLabel.compoenent.tsx +++ b/frontend/components/kanban/card/CardApplicantStatusLabel.compoenent.tsx @@ -2,29 +2,32 @@ interface KanbanCardApplicantStatusLabelProps { passState: "non-passed" | "first-passed" | "final-passed"; } +const labelConfig = { + "non-passed": { + backgroundColor: "bg-gray-300", + label: "처리중", + }, + "first-passed": { + backgroundColor: "bg-lime-300", + label: "1차 합격", + }, + "final-passed": { + backgroundColor: "bg-blue-300", + label: "최종 합격", + }, +}; + const KanbanCardApplicantStatusLabel = ({ passState, }: KanbanCardApplicantStatusLabelProps) => { - switch (passState) { - case "non-passed": - return ( -
- 처리중 -
- ); - case "first-passed": - return ( -
- 1차 합격 -
- ); - case "final-passed": - return ( -
- 최종 합격 -
- ); - } + const { backgroundColor, label } = labelConfig[passState]; + return ( +
+ {label} +
+ ); }; export default KanbanCardApplicantStatusLabel;