resistants/src/router.tsx

23 lines
573 B
TypeScript
Raw Normal View History

2023-02-20 17:22:01 +00:00
import React from "react";
import {createHashRouter} from "react-router-dom";
import {Layout} from "./Layout";
import NotFound from "./routes/NotFound";
import {ListeResistants} from "./routes/Liste";
2023-02-20 17:22:01 +00:00
import {PageResistant} from "./routes/PageResistant";
export const router = createHashRouter([{
path: "/",
element: <Layout/>,
errorElement: <NotFound/>,
children: [
{
path: "/",
element: <ListeResistants/>,
},
{
path: ":nomResistant",
element: <PageResistant/>,
}
]
}])