2026-01-21 20:16:09 +09:00
|
|
|
import { useLocation } from 'react-router-dom';
|
|
|
|
|
import Header from './Header';
|
|
|
|
|
import Footer from './Footer';
|
|
|
|
|
import '@/pc.css';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* PC 레이아웃 컴포넌트
|
|
|
|
|
*/
|
|
|
|
|
function Layout({ children }) {
|
|
|
|
|
const location = useLocation();
|
|
|
|
|
|
|
|
|
|
// Footer 숨김 페이지 (화면 고정 레이아웃)
|
2026-01-22 11:32:43 +09:00
|
|
|
const hideFooterPages = ['/schedule', '/members', '/album', '/birthday'];
|
2026-01-21 20:16:09 +09:00
|
|
|
const hideFooter = hideFooterPages.some(
|
|
|
|
|
(path) =>
|
|
|
|
|
location.pathname === path || location.pathname.startsWith(path + '/')
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
// 일정 페이지에서는 스크롤바도 숨김 (내부에서 자체 스크롤 처리)
|
|
|
|
|
const isSchedulePage = location.pathname === '/schedule';
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="h-screen overflow-hidden flex flex-col">
|
|
|
|
|
<Header />
|
|
|
|
|
<main
|
|
|
|
|
className={`flex-1 min-h-0 flex flex-col ${
|
|
|
|
|
isSchedulePage ? 'overflow-hidden' : 'overflow-y-auto'
|
|
|
|
|
}`}
|
|
|
|
|
>
|
|
|
|
|
<div className="flex-1 flex flex-col">{children}</div>
|
|
|
|
|
{!hideFooter && <Footer />}
|
|
|
|
|
</main>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default Layout;
|