blob: 3c20c5465d4a60808ef26977cfc521dbbb7c981d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
import { Route, Switch } from "wouter";
import { OfflineBanner, ProtectedRoute } from "./components";
import {
DeckDetailPage,
HomePage,
LoginPage,
NotFoundPage,
StudyPage,
} from "./pages";
export function App() {
return (
<>
<OfflineBanner />
<Switch>
<Route path="/">
<ProtectedRoute>
<HomePage />
</ProtectedRoute>
</Route>
<Route path="/decks/:deckId">
<ProtectedRoute>
<DeckDetailPage />
</ProtectedRoute>
</Route>
<Route path="/decks/:deckId/study">
<ProtectedRoute>
<StudyPage />
</ProtectedRoute>
</Route>
<Route path="/login" component={LoginPage} />
<Route component={NotFoundPage} />
</Switch>
</>
);
}
|