Skip to content

Commit

Permalink
chore: 상수 및 컴포넌트 일부 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
suwonthugger committed Feb 7, 2025
1 parent da39edc commit 9f407d3
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
19 changes: 17 additions & 2 deletions src/shared/constants/colorPallete.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const colors = [
export const COLOR_PALETTE = [
'bg-color-palette-red',
'bg-color-palette-yellow1',
'bg-color-palette-yellow2',
Expand All @@ -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;
22 changes: 22 additions & 0 deletions src/shared/utils/path.ts
Original file line number Diff line number Diff line change
@@ -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;
};

0 comments on commit 9f407d3

Please sign in to comment.