From 9f407d3bf744ebd7b9c5eb234bc88f19787a1979 Mon Sep 17 00:00:00 2001 From: suwonthugger <127329855+suwonthugger@users.noreply.github.com> Date: Fri, 7 Feb 2025 17:02:00 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20=EC=83=81=EC=88=98=20=EB=B0=8F=20?= =?UTF-8?q?=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EC=9D=BC=EB=B6=80=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/shared/constants/colorPallete.ts | 19 +++++++++++++++++-- src/shared/utils/path.ts | 22 ++++++++++++++++++++++ 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 src/shared/utils/path.ts diff --git a/src/shared/constants/colorPallete.ts b/src/shared/constants/colorPallete.ts index 406b5a9..5b54057 100644 --- a/src/shared/constants/colorPallete.ts +++ b/src/shared/constants/colorPallete.ts @@ -1,4 +1,4 @@ -export const colors = [ +export const COLOR_PALETTE = [ 'bg-color-palette-red', 'bg-color-palette-yellow1', 'bg-color-palette-yellow2', @@ -11,4 +11,19 @@ export const colors = [ 'bg-color-palette-purple1', 'bg-color-palette-pink', 'bg-gray-bg-07', -]; +] as const; + +export const COLOR_PALETTE_MAP = { + '#FF8080': 'bg-color-palette-red', + '#FFB62F': 'bg-color-palette-yellow1', + '#FFF787': 'bg-color-palette-yellow2', + '#B6FFA5': 'bg-color-palette-green1', + '#5CE082': 'bg-color-palette-green2', + '#179F62': 'bg-color-palette-green3', + '#06FFD2': 'bg-mint-01', + '#27C5FF': 'bg-color-palette-blue1', + '#3D6DFF': 'bg-color-palette-blue2', + '#7742FF': 'bg-color-palette-purple1', + '#FF74F8': 'bg-color-palette-pink', + '#868C93': 'bg-gray-bg-07', +} as const; diff --git a/src/shared/utils/path.ts b/src/shared/utils/path.ts new file mode 100644 index 0000000..c4da807 --- /dev/null +++ b/src/shared/utils/path.ts @@ -0,0 +1,22 @@ +import { ROUTES_CONFIG } from '@/router/routesConfig'; + +export const getActivePath = (path: string) => { + let activePage; + + switch (path) { + case ROUTES_CONFIG.home.path: + activePage = ROUTES_CONFIG.home.path; + break; + case ROUTES_CONFIG.onboarding.path: + activePage = ROUTES_CONFIG.onboarding.path; + break; + case ROUTES_CONFIG.allowedService.path: + activePage = ROUTES_CONFIG.allowedService.path; + break; + default: + activePage = ''; + break; + } + + return activePage; +};