22301008 | af17315 | 2025-06-15 10:46:25 +0800 | [diff] [blame^] | 1 | import React from 'react' |
| 2 | import { Routes, Route, Navigate } from 'react-router-dom' |
| 3 | import UploadPage from '../components/UploadPage' |
| 4 | import PlaceholderPage from '../components/PlaceholderPage' |
| 5 | import HomeFeed from '../components/HomeFeed' |
| 6 | |
| 7 | export default function AppRouter() { |
| 8 | return ( |
| 9 | <Routes> |
| 10 | <Route path="/" element={<Navigate to="/dashboard" replace />} /> |
| 11 | |
| 12 | <Route path="/home" element={<HomeFeed />} /> |
| 13 | <Route path="/notebooks" element={<PlaceholderPage pageId="notebooks" />} /> |
| 14 | <Route path="/activity" element={<PlaceholderPage pageId="activity" />} /> |
| 15 | <Route path="/notes" element={<PlaceholderPage pageId="notes" />} /> |
| 16 | <Route path="/creator" element={<PlaceholderPage pageId="creator" />} /> |
| 17 | <Route path="/journal" element={<PlaceholderPage pageId="journal" />} /> |
| 18 | |
| 19 | <Route path="/dashboard/*" element={<UploadPage />} /> |
| 20 | |
| 21 | <Route path="*" element={<PlaceholderPage pageId="home" />} /> |
| 22 | </Routes> |
| 23 | ) |
| 24 | } |