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 };