2023-01-29 20:27:02 +00:00
|
|
|
import React from 'react'
|
|
|
|
import ReactDOM from 'react-dom/client'
|
|
|
|
import {Outlet} from "react-router";
|
|
|
|
import {createHashRouter, RouterProvider} from "react-router-dom"
|
|
|
|
import {ListeResistants, resistantsLoader} from "./routes/ListeResistants"
|
|
|
|
import NotFound from "./routes/NotFound";
|
|
|
|
import { PageResistant } from "./routes/PageResistant";
|
|
|
|
import './style/SquareSpace/vars.css'
|
|
|
|
import './style/SquareSpace/global.css'
|
|
|
|
import './style/SquareSpace/blocks.css'
|
|
|
|
import './style/SquareSpace/table.css'
|
|
|
|
import './style/SquareSpace/video.css'
|
2023-01-30 00:03:17 +00:00
|
|
|
import './photos'
|
2023-01-29 20:27:02 +00:00
|
|
|
|
|
|
|
const Layout = () => <div>
|
|
|
|
<Outlet />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
const router = createHashRouter([{
|
|
|
|
path: "/",
|
|
|
|
element: <Layout />,
|
|
|
|
errorElement: <NotFound />,
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: "/",
|
|
|
|
element: <ListeResistants/>,
|
|
|
|
loader: resistantsLoader,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: ":nomResistant",
|
2023-01-30 00:56:08 +00:00
|
|
|
element: <PageResistant/>,
|
|
|
|
loader: resistantsLoader,
|
2023-01-29 20:27:02 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}])
|
|
|
|
|
|
|
|
|
|
|
|
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
|
|
|
|
<React.StrictMode>
|
|
|
|
<RouterProvider router={router} />
|
|
|
|
</React.StrictMode>,
|
|
|
|
)
|