aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/client/App.tsx
blob: 4c5b08a57332e305d7eb9167d337010fc4b3d6f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { Route, Switch } from "wouter";
import { ProtectedRoute } from "./components";
import { DeckDetailPage, HomePage, LoginPage, NotFoundPage } from "./pages";

export function App() {
	return (
		<Switch>
			<Route path="/">
				<ProtectedRoute>
					<HomePage />
				</ProtectedRoute>
			</Route>
			<Route path="/decks/:deckId">
				<ProtectedRoute>
					<DeckDetailPage />
				</ProtectedRoute>
			</Route>
			<Route path="/login" component={LoginPage} />
			<Route component={NotFoundPage} />
		</Switch>
	);
}