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' |
22301008 | d5fbb78 | 2025-06-18 16:28:43 +0800 | [diff] [blame] | 6 | import PostDetail from '../components/PostDetail' |
22301008 | af17315 | 2025-06-15 10:46:25 +0800 | [diff] [blame] | 7 | |
| 8 | export default function AppRouter() { |
| 9 | return ( |
| 10 | <Routes> |
| 11 | <Route path="/" element={<Navigate to="/dashboard" replace />} /> |
| 12 | |
| 13 | <Route path="/home" element={<HomeFeed />} /> |
22301008 | d5fbb78 | 2025-06-18 16:28:43 +0800 | [diff] [blame] | 14 | <Route path="/post/:id" element={<PostDetail />} /> |
22301008 | af17315 | 2025-06-15 10:46:25 +0800 | [diff] [blame] | 15 | <Route path="/notebooks" element={<PlaceholderPage pageId="notebooks" />} /> |
| 16 | <Route path="/activity" element={<PlaceholderPage pageId="activity" />} /> |
| 17 | <Route path="/notes" element={<PlaceholderPage pageId="notes" />} /> |
| 18 | <Route path="/creator" element={<PlaceholderPage pageId="creator" />} /> |
| 19 | <Route path="/journal" element={<PlaceholderPage pageId="journal" />} /> |
| 20 | |
| 21 | <Route path="/dashboard/*" element={<UploadPage />} /> |
| 22 | |
| 23 | <Route path="*" element={<PlaceholderPage pageId="home" />} /> |
| 24 | </Routes> |
| 25 | ) |
| 26 | } |