import { useEffect } from 'react'; import { BrowserRouter, Routes, Route } from 'react-router-dom'; import { BrowserView, MobileView } from 'react-device-detect'; // 공통 컴포넌트 import { ScrollToTop } from '@/components/common'; // PC 레이아웃 import { Layout as PCLayout } from '@/components/pc'; // Mobile 레이아웃 import { Layout as MobileLayout } from '@/components/mobile'; // 페이지 import { PCHome, MobileHome } from '@/pages/home'; import { PCMembers, MobileMembers } from '@/pages/members'; import { PCSchedule, MobileSchedule, PCScheduleDetail, MobileScheduleDetail, PCBirthday, MobileBirthday, } from '@/pages/schedule'; import { PCAlbum, MobileAlbum, PCAlbumDetail, MobileAlbumDetail, PCTrackDetail, MobileTrackDetail, PCAlbumGallery, MobileAlbumGallery, } from '@/pages/album'; import { PCNotFound, MobileNotFound } from '@/pages/common'; /** * PC 환경에서 body에 클래스 추가하는 래퍼 */ function PCWrapper({ children }) { useEffect(() => { document.body.classList.add('is-pc'); return () => document.body.classList.remove('is-pc'); }, []); return children; } /** * 프로미스나인 팬사이트 메인 앱 * react-device-detect를 사용한 PC/Mobile 분리 */ function App() { return ( {/* PC 뷰 */} {/* 관리자 페이지 (레이아웃 없음) - 추후 추가 */} {/* } /> */} {/* 일반 페이지 (레이아웃 포함) */} } /> } /> } /> } /> } /> } /> } /> } /> } /> {/* 404 페이지 */} } /> } /> {/* Mobile 뷰 */} } /> } /> } /> } /> } /> } /> } /> } /> } /> {/* 404 페이지 */} } /> ); } export default App;