27 lines
742 B
TypeScript
27 lines
742 B
TypeScript
import { BrowserRouter, Route, Routes } from "react-router";
|
|||
|
|
import { Layout } from "./components/Layout";
|
||
|
|
import { HomePage } from "./pages/HomePage";
|
||
|
|
import { NotFoundPage } from "./pages/NotFoundPage";
|
||
|
|
import { SignInPage } from "./pages/SignInPage";
|
||
|
|
|
||
|
|
/** Route table. Exported apart from the router so tests can mount it in a MemoryRouter. */
|
||
|
|
export function AppRoutes() {
|
||
|
|
return (
|
||
|
|
<Routes>
|
||
|
|
<Route element={<Layout />}>
|
||
|
|
<Route index element={<HomePage />} />
|
||
|
|
<Route path="signin" element={<SignInPage />} />
|
||
|
|
<Route path="*" element={<NotFoundPage />} />
|
||
|
|
</Route>
|
||
|
|
</Routes>
|
||
|
|
);
|
||
|
|
}
|
||
|
|
|
||
|
|
export default function App() {
|
||
|
|
return (
|
||
|
|
<BrowserRouter>
|
||
|
|
<AppRoutes />
|
||
|
|
</BrowserRouter>
|
||
|
|
);
|
||
|
|
}
|