feat: PublicShell + TopNav + 홈 v6 (ai_music_creator 참조)
- 사이드바 대시보드는 /admin, /mypage 에서만 사용 - 공개 페이지는 상단 TopNav + 다크 footer(PublicShell) - 홈 v6: Hero + Evidence + Before/After + Toolkit + 3-Step + Other Products Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3,19 +3,26 @@
|
||||
import { useState } from 'react';
|
||||
import { usePathname } from 'next/navigation';
|
||||
import Sidebar from './Sidebar';
|
||||
import PublicShell from './PublicShell';
|
||||
|
||||
const STANDALONE_PATHS = ['/login', '/signup', '/admin'];
|
||||
const SIDEBAR_PATHS = ['/mypage'];
|
||||
|
||||
export default function DashboardShell({ children }: { children: React.ReactNode }) {
|
||||
const [sidebarOpen, setSidebarOpen] = useState(false);
|
||||
const pathname = usePathname();
|
||||
|
||||
const isStandalone = STANDALONE_PATHS.some((p) => pathname.startsWith(p));
|
||||
const useSidebar = SIDEBAR_PATHS.some((p) => pathname.startsWith(p));
|
||||
|
||||
if (isStandalone) {
|
||||
return <>{children}</>;
|
||||
}
|
||||
|
||||
if (!useSidebar) {
|
||||
return <PublicShell>{children}</PublicShell>;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="dashboard-layout">
|
||||
<Sidebar isOpen={sidebarOpen} onClose={() => setSidebarOpen(false)} />
|
||||
|
||||
Reference in New Issue
Block a user