mypage가 PublicShell + TopNav를 사용하도록 라우팅 단순화: - SIDEBAR_PATHS 상수 + Sidebar import + useSidebar 분기 + 모바일 top bar + 사이드바 안의 카카오 버튼 + 사업자 정보 footer + style 블록 모두 삭제 - Standalone 분기(/login·/signup·/admin)는 그대로 유지 - 카카오 버튼은 PublicShell로 이미 이동(Task 3) - 사업자 정보 footer는 PublicShell footer가 동일 정보 보유 Sidebar.tsx 자체는 다음 커밋(Task 7)에서 삭제 — 사용처 0이 됨. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
19 lines
467 B
TypeScript
19 lines
467 B
TypeScript
'use client';
|
|
|
|
import { usePathname } from 'next/navigation';
|
|
import PublicShell from './PublicShell';
|
|
|
|
const STANDALONE_PATHS = ['/login', '/signup', '/admin'];
|
|
|
|
export default function DashboardShell({ children }: { children: React.ReactNode }) {
|
|
const pathname = usePathname();
|
|
|
|
const isStandalone = STANDALONE_PATHS.some((p) => pathname.startsWith(p));
|
|
|
|
if (isStandalone) {
|
|
return <>{children}</>;
|
|
}
|
|
|
|
return <PublicShell>{children}</PublicShell>;
|
|
}
|