import { useLocation, useNavigate } from 'react-router'; import { ChevronLeft, ChevronRight } from 'lucide-react'; const PAGE_FLOW = [ { path: '/', label: '랜딩' }, { path: '/report/view-clinic', label: '마케팅 분석' }, { path: '/plan/view-clinic', label: '콘텐츠 기획' }, { path: '/studio/view-clinic', label: '콘텐츠 제작' }, { path: '/channels', label: '채널 연결' }, { path: '/distribute', label: '콘텐츠 배포' }, { path: '/performance', label: '성과 관리' }, ]; export default function PageNavigator() { const location = useLocation(); const navigate = useNavigate(); const currentIndex = PAGE_FLOW.findIndex((p) => p.path === location.pathname); if (currentIndex === -1) return null; const prev = currentIndex > 0 ? PAGE_FLOW[currentIndex - 1] : null; const next = currentIndex < PAGE_FLOW.length - 1 ? PAGE_FLOW[currentIndex + 1] : null; return (
{/* Back */} {/* Page Indicators */}
{PAGE_FLOW.map((page, i) => (
{/* Next */}
); }