2026-01-22 18:44:15 +09:00
|
|
|
/**
|
|
|
|
|
* AdminLayout 컴포넌트
|
|
|
|
|
* 모든 Admin 페이지에서 공통으로 사용하는 레이아웃
|
|
|
|
|
* 헤더 고정 + 본문 스크롤 구조
|
|
|
|
|
*/
|
|
|
|
|
import { useLocation } from 'react-router-dom';
|
|
|
|
|
import Header from './Header';
|
|
|
|
|
|
|
|
|
|
function AdminLayout({ user, children }) {
|
|
|
|
|
const location = useLocation();
|
|
|
|
|
|
|
|
|
|
// 일정 관리 페이지는 내부 스크롤 처리
|
feat: 관리자 페이지 마이그레이션 완료 (Phase 4-5)
- 관리자 페이지 폴더 구조 재구성 (pages/pc/admin/)
- login/, dashboard/, members/, albums/, schedules/
- 앨범 관리 페이지 마이그레이션 (Albums, AlbumForm, AlbumPhotos, AlbumTeasers)
- 일정 관리 페이지 마이그레이션 (Schedules, ScheduleForm, ScheduleCategory, ScheduleDict, ScheduleBots)
- DatePicker 컴포넌트 버그 수정 (월 이동 및 연도 선택)
- 일정 관리 라우트 경로 수정 (/admin/schedule)
- 마이그레이션 문서 업데이트
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 20:35:05 +09:00
|
|
|
const isSchedulePage = location.pathname.includes('/admin/schedule');
|
2026-01-22 18:44:15 +09:00
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="h-screen overflow-hidden flex flex-col bg-gray-50">
|
|
|
|
|
<Header user={user} />
|
|
|
|
|
<main className={`flex-1 min-h-0 ${isSchedulePage ? 'overflow-hidden' : 'overflow-y-auto'}`}>
|
|
|
|
|
{children}
|
|
|
|
|
</main>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default AdminLayout;
|