fromis_9/frontend-temp/src/components/pc/Layout.jsx
caadiq 86bf2359f2 feat(frontend): Phase 6 - 공통 컴포넌트 및 레이아웃 구현
- 공통 컴포넌트: Loading, ErrorBoundary, Toast, Tooltip, ScrollToTop, Lightbox
- PC 레이아웃: Layout, Header, Footer
- Mobile 레이아웃: Layout (Header + BottomNav 통합)
- CSS: pc.css, mobile.css (디바이스별 스타일)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 20:16:09 +09:00

37 lines
1 KiB
JavaScript

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 숨김 페이지 (화면 고정 레이아웃)
const hideFooterPages = ['/schedule', '/members', '/album'];
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;