fromis_9/frontend-temp/src/components/pc/Layout.jsx
caadiq 97850b12c1 refactor: 코드 구조 개선 및 중복 제거
- 페이지 폴더 구조를 문서대로 정리 (pc/, mobile/ 하위 폴더)
- Mobile Schedule 리팩토링 (1,495줄 → 780줄, 48% 감소)
- MobileCalendar를 별도 공통 컴포넌트로 분리
- MobileBirthdayCard에 motion/delay 지원 추가
- 중복 상수 통합: CATEGORY_ID, MIN_YEAR, SEARCH_LIMIT, MEMBER_ENGLISH_NAMES
- sections/utils.js 중복 함수 제거 (@/utils에서 re-export)
- formatXDateTime 함수 개선 (datetime 문자열 직접 처리)
- 모바일 유튜브 숏츠 표시 개선 (가로 비율, 전체화면시 세로)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 11:32:43 +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', '/birthday'];
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;