mirror of
https://github.com/Dasemu/skipredictor.git
synced 2026-11-26 15:26:15 +00:00
feat(crowd): add automated historical webcam collection and dataset integration
This commit is contained in:
1 parent
e952cea417
commit
b4c6041eea
91 files changed
+7957
-40
No files matched your search
@@ -0,0 +1,49 @@
|
||||
import { HashRouter, Navigate, Route, Routes } from 'react-router-dom'
|
||||
|
||||
import { AppProvider } from './app/AppContext'
|
||||
import { useAppContext } from './app/useAppContext'
|
||||
import { AppShell } from './components/AppShell'
|
||||
import { SplashScreen } from './components/StateViews'
|
||||
import { AuthPage } from './pages/AuthPage'
|
||||
import { PredictionsPage } from './pages/PredictionsPage'
|
||||
import { SettingsPage } from './pages/SettingsPage'
|
||||
import { StationPage } from './pages/StationPage'
|
||||
import { StationsPage } from './pages/StationsPage'
|
||||
|
||||
function AppRoutes() {
|
||||
const { isAuthenticated, isBooting } = useAppContext()
|
||||
|
||||
if (isBooting) {
|
||||
return <SplashScreen />
|
||||
}
|
||||
|
||||
if (!isAuthenticated) {
|
||||
return <AuthPage />
|
||||
}
|
||||
|
||||
return (
|
||||
<HashRouter>
|
||||
<Routes>
|
||||
<Route element={<AppShell />}>
|
||||
<Route index element={<Navigate to="/stations" replace />} />
|
||||
<Route path="/stations" element={<StationsPage />} />
|
||||
<Route path="/stations/:stationId" element={<StationPage />} />
|
||||
<Route path="/predictions" element={<PredictionsPage />} />
|
||||
<Route path="/predictions/:date" element={<PredictionsPage />} />
|
||||
<Route path="/settings" element={<SettingsPage />} />
|
||||
<Route path="*" element={<Navigate to="/stations" replace />} />
|
||||
</Route>
|
||||
</Routes>
|
||||
</HashRouter>
|
||||
)
|
||||
}
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<AppProvider>
|
||||
<AppRoutes />
|
||||
</AppProvider>
|
||||
)
|
||||
}
|
||||
|
||||
export default App
|
||||
Reference in new issue
Block a user