From 3b825a1cf2ac6fdbadd382968a7bef05288c0f6f Mon Sep 17 00:00:00 2001 From: wangdl Date: Thu, 18 Jun 2026 18:00:49 +0800 Subject: [PATCH] fix: add missing learning sub-page routes in App.tsx 9 sub-pages (events, sessions, progress, daily, records, timeline, anomalies, user-diagnose, material-diagnose) were defined in routes/index.tsx but not registered as React Router elements, causing 404 for all /learning/* pages except dashboard and replay. Co-Authored-By: Claude Opus 4.7 --- src/App.tsx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/App.tsx b/src/App.tsx index a759757..f0b156e 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -45,6 +45,15 @@ const NotificationAdmin = lazy(() => import('./pages/NotificationAdmin')) const CacheAdmin = lazy(() => import('./pages/CacheAdmin')) const LearningData = lazy(() => import('./pages/LearningData')) const LearningDashboard = lazy(() => import('./pages/learning/Dashboard')) +const ReadingEventPage = lazy(() => import('./pages/learning/DataPages').then(m => ({ default: m.ReadingEventPage }))) +const SessionPage = lazy(() => import('./pages/learning/DataPages').then(m => ({ default: m.SessionPage }))) +const ProgressPage = lazy(() => import('./pages/learning/DataPages').then(m => ({ default: m.ProgressPage }))) +const DailyActivityPage = lazy(() => import('./pages/learning/DataPages').then(m => ({ default: m.DailyActivityPage }))) +const RecordPage = lazy(() => import('./pages/learning/DataPages').then(m => ({ default: m.RecordPage }))) +const AnomalyPage = lazy(() => import('./pages/learning/DataPages').then(m => ({ default: m.AnomalyPage }))) +const UserTimelinePage = lazy(() => import('./pages/learning/DataPages').then(m => ({ default: m.UserTimelinePage }))) +const UserDiagnosePage = lazy(() => import('./pages/learning/DataPages').then(m => ({ default: m.UserDiagnosePage }))) +const MaterialDiagnosePage = lazy(() => import('./pages/learning/DataPages').then(m => ({ default: m.MaterialDiagnosePage }))) const LearningReplay = lazy(() => import('./pages/learning/ReplayPage')) const BackupAdmin = lazy(() => import('./pages/BackupAdmin')) const ReportingAdmin = lazy(() => import('./pages/ReportingAdmin')) @@ -185,6 +194,15 @@ function App() { }>} /> }>} /> }>} /> + }>} /> + }>} /> + }>} /> + }>} /> + }>} /> + }>} /> + }>} /> + }>} /> + }>} /> }>} /> }>} /> }>} />