From 7d89a664aae29bbcb1da7f68f4e2cae70abb3272 Mon Sep 17 00:00:00 2001 From: gahusb Date: Wed, 27 May 2026 02:05:52 +0900 Subject: [PATCH] =?UTF-8?q?feat(saju-ui-v2):=20BottomNav.jsx=20=E2=80=94?= =?UTF-8?q?=205=20=ED=95=AD=EB=AA=A9=20+=20safe-area=20+=20active=20accent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/saju/_shell/BottomNav.jsx | 77 +++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 src/pages/saju/_shell/BottomNav.jsx diff --git a/src/pages/saju/_shell/BottomNav.jsx b/src/pages/saju/_shell/BottomNav.jsx new file mode 100644 index 0000000..4201679 --- /dev/null +++ b/src/pages/saju/_shell/BottomNav.jsx @@ -0,0 +1,77 @@ +import React from 'react'; +import { useNavigate, useLocation } from 'react-router-dom'; +import { IconHome, IconSun, IconHeart, IconYinYang, IconUser } from './Icons'; +import hexA from './helpers/hexA'; + +const NAV_ITEMS = [ + { id: 'home', to: '/saju', label: '홈', Icon: IconHome, accent: '#1F2A44' }, + { id: 'today', to: '/saju/today', label: '오늘의 운세', Icon: IconSun, accent: '#D4AF37' }, + { id: 'match', to: '/saju/compatibility', label: '궁합보기', Icon: IconHeart, accent: '#4E6B5C' }, + { id: 'saju', to: '/saju/result', label: '사주풀이', Icon: IconYinYang, accent: '#6A4C7C' }, + { id: 'me', to: '/saju/me', label: '마이페이지', Icon: IconUser, accent: '#6B6B6B' }, +]; + +function pathToCurrent(pathname) { + if (pathname === '/saju' || pathname === '/saju/') return 'home'; + if (pathname.startsWith('/saju/today')) return 'today'; + if (pathname.startsWith('/saju/compatibility')) return 'match'; + if (pathname.startsWith('/saju/result')) return 'saju'; + if (pathname.startsWith('/saju/me')) return 'me'; + return 'home'; +} + +export default function BottomNav({ theme = 'ivory' }) { + const navigate = useNavigate(); + const { pathname } = useLocation(); + const current = pathToCurrent(pathname); + const isDark = theme === 'navy'; + const bg = isDark ? 'rgba(20,27,48,0.92)' : '#FBF7EF'; + const border = isDark ? 'rgba(212,175,55,0.18)' : 'rgba(31,42,68,0.08)'; + const inactive = isDark ? 'rgba(247,242,232,0.55)' : '#9A968D'; + + return ( + + ); +} + +export { NAV_ITEMS };