server/assets/js/react/router.tsx

33 lines
666 B
TypeScript
Raw Normal View History

import * as React from "react"
import { createBrowserRouter } from "react-router-dom"
2023-12-04 23:16:50 +00:00
import { FallbackMessage } from "./components/FallbackMessage"
import { About } from "./pages/About"
import { Contact } from "./pages/Contact"
2023-12-04 13:42:32 +00:00
import { Search } from "./pages/Search"
export const router = createBrowserRouter([
{
path: "/",
2023-12-04 13:42:32 +00:00
element: <Search />,
},
{
path: "/about/",
element: <About />,
},
{
path: "/contact/",
element: <Contact />,
},
2023-12-04 23:16:50 +00:00
{
path: "*",
element: (
<FallbackMessage
className="mt-40"
title="Illegal Move!"
body="This page has wandered off the board."
/>
),
},
])