From f844d3fed327f0aaa3717b1696575aa97ec95788 Mon Sep 17 00:00:00 2001 From: hanyugeon Date: Sun, 13 Aug 2023 18:34:24 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20getIconColorClasses()=EB=A5=BC=20?= =?UTF-8?q?=EC=A1=B0=EA=B1=B4=EB=B0=98=ED=99=98=EB=AC=B8=20=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ui/Base/BottomNavigation.tsx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/ui/Base/BottomNavigation.tsx b/src/ui/Base/BottomNavigation.tsx index b753e727..ee8ddc47 100644 --- a/src/ui/Base/BottomNavigation.tsx +++ b/src/ui/Base/BottomNavigation.tsx @@ -35,20 +35,19 @@ const icons = [ const BottomNavigation = () => { const pathname = usePathname(); - const getIconColorClasses = (href: string) => { - return href === pathname - ? 'fill-main-900 text-main-900' - : 'fill-placeholder text-placeholder'; - }; + const iconColor = { + active: 'fill-main-900 text-main-900', + inactive: 'fill-placeholder text-placeholder', + } as const; return (
{icons.map(({ icon, label, href }) => (
{icon}
{label}