From b11c650a227a618ccc0e076fb3cc0f43833e2ec7 Mon Sep 17 00:00:00 2001 From: PHJoon Date: Mon, 11 Sep 2023 18:22:28 +0900 Subject: [PATCH] =?UTF-8?q?[Fix]=20[GGFE-233]=20if=EB=AC=B8->switch?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=80=EA=B2=BD=20+=20=EC=82=AD=EC=A0=9C?= =?UTF-8?q?=EB=B6=88=EA=B0=80=20->=20X?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/admin/usageHistory/MenuTab.tsx | 18 ++++++++++++++---- components/admin/usageHistory/ProfileList.tsx | 2 +- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/components/admin/usageHistory/MenuTab.tsx b/components/admin/usageHistory/MenuTab.tsx index d7e0191ff..b5a7c08c2 100644 --- a/components/admin/usageHistory/MenuTab.tsx +++ b/components/admin/usageHistory/MenuTab.tsx @@ -28,10 +28,20 @@ function MenuTab() { ]; useEffect(() => { - if (tabIdx === 0) setChild(); - if (tabIdx === 1) setChild(); - if (tabIdx === 2) setChild(); - if (tabIdx === 3) setChild(); + switch (tabIdx) { + case 0: + setChild(); + break; + case 1: + setChild(); + break; + case 2: + setChild(); + break; + case 3: + setChild(); + break; + } }, [tabIdx]); return ( diff --git a/components/admin/usageHistory/ProfileList.tsx b/components/admin/usageHistory/ProfileList.tsx index 1e94822d9..8bad02d46 100644 --- a/components/admin/usageHistory/ProfileList.tsx +++ b/components/admin/usageHistory/ProfileList.tsx @@ -158,7 +158,7 @@ function ProfileList() { onClick={() => deleteProfile(profile)} disabled={!profile.isCurrent} > - 삭제 + {profile.isCurrent ? '삭제' : 'X'} ) : columnName === 'isCurrent' ? ( profile[columnName as keyof Iprofile] ? (