18 lines
572 B
TypeScript
18 lines
572 B
TypeScript
import type { RouteObject } from "react-router";
|
|
import { ErrorPage } from "./routes/ErrorPage";
|
|
import { Home } from "./routes/Home";
|
|
import { Layout } from "./routes/Layout";
|
|
import { Status, statusLoader } from "./routes/Status";
|
|
|
|
// Data-mode route table. Add pages here; loaders live next to their component.
|
|
export const routes: RouteObject[] = [
|
|
{
|
|
path: "/",
|
|
element: <Layout />,
|
|
errorElement: <ErrorPage />,
|
|
children: [
|
|
{ index: true, element: <Home /> },
|
|
{ path: "status", element: <Status />, loader: statusLoader },
|
|
],
|
|
},
|
|
];
|