Mise en place du routeur

This commit is contained in:
iMax 2024-12-05 19:19:41 +01:00
parent 583b14ce0d
commit c992014d53
2 changed files with 13 additions and 5 deletions

View file

@ -1,10 +1,17 @@
import { StrictMode } from 'react'
import { BrowserRouter, Route, Routes } from "react-router";
import { createRoot } from 'react-dom/client'
import './index.css'
import App from './App.tsx'
import MainPage from "./pages/MainPage.tsx";
import GamePage from "./pages/GamePage.tsx";
createRoot(document.getElementById('root')!).render(
<StrictMode>
<App />
</StrictMode>,
<BrowserRouter>
<Routes>
<Route path="/" element={<MainPage />} />
<Route path="/vite" element={<App />} />
<Route path="/game" element={<GamePage />} />
</Routes>
</BrowserRouter>,
)