2025-12-31 21:51:23 +09:00
|
|
|
import { BrowserRouter, Routes, Route } from 'react-router-dom';
|
|
|
|
|
import { BrowserView, MobileView } from 'react-device-detect';
|
|
|
|
|
|
|
|
|
|
// PC 페이지
|
|
|
|
|
import PCHome from './pages/pc/Home';
|
|
|
|
|
import PCMembers from './pages/pc/Members';
|
2026-01-03 14:43:43 +09:00
|
|
|
import PCAlbum from './pages/pc/Album';
|
2026-01-01 10:20:54 +09:00
|
|
|
import PCAlbumDetail from './pages/pc/AlbumDetail';
|
2026-01-01 17:20:36 +09:00
|
|
|
import PCAlbumGallery from './pages/pc/AlbumGallery';
|
2025-12-31 21:51:23 +09:00
|
|
|
import PCSchedule from './pages/pc/Schedule';
|
|
|
|
|
|
2026-01-01 18:01:42 +09:00
|
|
|
// 관리자 페이지
|
|
|
|
|
import AdminLogin from './pages/pc/admin/AdminLogin';
|
|
|
|
|
import AdminDashboard from './pages/pc/admin/AdminDashboard';
|
2026-01-04 13:10:34 +09:00
|
|
|
import AdminMembers from './pages/pc/admin/AdminMembers';
|
2026-01-04 14:02:45 +09:00
|
|
|
import AdminMemberEdit from './pages/pc/admin/AdminMemberEdit';
|
2026-01-01 18:05:39 +09:00
|
|
|
import AdminAlbums from './pages/pc/admin/AdminAlbums';
|
2026-01-01 18:28:01 +09:00
|
|
|
import AdminAlbumForm from './pages/pc/admin/AdminAlbumForm';
|
2026-01-01 22:31:38 +09:00
|
|
|
import AdminAlbumPhotos from './pages/pc/admin/AdminAlbumPhotos';
|
2026-01-01 18:01:42 +09:00
|
|
|
|
2025-12-31 21:51:23 +09:00
|
|
|
// PC 레이아웃
|
|
|
|
|
import PCLayout from './components/pc/Layout';
|
|
|
|
|
|
|
|
|
|
function App() {
|
|
|
|
|
return (
|
2026-01-01 14:15:39 +09:00
|
|
|
<BrowserRouter future={{ v7_startTransition: true, v7_relativeSplatPath: true }}>
|
2025-12-31 21:51:23 +09:00
|
|
|
<BrowserView>
|
2026-01-01 18:01:42 +09:00
|
|
|
<Routes>
|
|
|
|
|
{/* 관리자 페이지 (레이아웃 없음) */}
|
|
|
|
|
<Route path="/admin" element={<AdminLogin />} />
|
|
|
|
|
<Route path="/admin/dashboard" element={<AdminDashboard />} />
|
2026-01-04 13:10:34 +09:00
|
|
|
<Route path="/admin/members" element={<AdminMembers />} />
|
2026-01-04 14:02:45 +09:00
|
|
|
<Route path="/admin/members/:name/edit" element={<AdminMemberEdit />} />
|
2026-01-01 18:05:39 +09:00
|
|
|
<Route path="/admin/albums" element={<AdminAlbums />} />
|
2026-01-01 18:28:01 +09:00
|
|
|
<Route path="/admin/albums/new" element={<AdminAlbumForm />} />
|
|
|
|
|
<Route path="/admin/albums/:id/edit" element={<AdminAlbumForm />} />
|
2026-01-01 22:31:38 +09:00
|
|
|
<Route path="/admin/albums/:albumId/photos" element={<AdminAlbumPhotos />} />
|
2026-01-01 18:01:42 +09:00
|
|
|
|
|
|
|
|
{/* 일반 페이지 (레이아웃 포함) */}
|
|
|
|
|
<Route path="/*" element={
|
|
|
|
|
<PCLayout>
|
|
|
|
|
<Routes>
|
|
|
|
|
<Route path="/" element={<PCHome />} />
|
|
|
|
|
<Route path="/members" element={<PCMembers />} />
|
2026-01-03 14:43:43 +09:00
|
|
|
<Route path="/album" element={<PCAlbum />} />
|
2026-01-01 18:01:42 +09:00
|
|
|
<Route path="/album/:name" element={<PCAlbumDetail />} />
|
|
|
|
|
<Route path="/album/:name/gallery" element={<PCAlbumGallery />} />
|
|
|
|
|
<Route path="/schedule" element={<PCSchedule />} />
|
|
|
|
|
</Routes>
|
|
|
|
|
</PCLayout>
|
|
|
|
|
} />
|
|
|
|
|
</Routes>
|
2025-12-31 21:51:23 +09:00
|
|
|
</BrowserView>
|
|
|
|
|
<MobileView>
|
|
|
|
|
{/* 모바일 버전은 추후 구현 */}
|
|
|
|
|
<div className="flex items-center justify-center h-screen bg-gray-100 p-4">
|
|
|
|
|
<div className="text-center">
|
|
|
|
|
<p className="text-xl font-bold text-primary mb-2">fromis_9</p>
|
|
|
|
|
<p className="text-gray-500">모바일 버전은 준비 중입니다.</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</MobileView>
|
|
|
|
|
</BrowserRouter>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default App;
|