Files
jaengseung-made/app/components/DashboardShell.tsx
gahusb a965d95a24 refactor(shell): DashboardShell 사이드바 분기 통째 제거 → PublicShell 폴백
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>
2026-04-28 08:07:08 +09:00

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