You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
707 B
TypeScript

// frontend/components/Shell.tsx
// 조건부 셸: /login 은 풀스크린(Topbar·.shell-page 없음),
// 그 외 모든 페이지는 기존 셸(Topbar + .shell-page > main)을 그대로 렌더한다.
"use client";
import { usePathname } from "next/navigation";
import { Topbar } from "@/components/Topbar";
export function Shell({ children }: { children: React.ReactNode }) {
const pathname = usePathname();
// /login = 셸 밖 인증 화면(자체 배경) — Topbar 없음
const fullscreen = pathname?.startsWith("/login") ?? false;
if (fullscreen) {
return <>{children}</>;
}
return (
<div className="shell-page">
<Topbar />
<main>{children}</main>
</div>
);
}