Make a better article section and add the article page.

This commit is contained in:
= 2024-12-06 01:28:36 +01:00
parent 9562eb98dc
commit e121090433
7 changed files with 111 additions and 26 deletions

View file

@ -2,13 +2,20 @@ import { BrowserRouter, Route, Routes } from "react-router";
import { createRoot } from 'react-dom/client'
import MainPage from "./pages/MainPage.tsx";
import GamePage from "./pages/GamePage.tsx";
import ArticlePage from "./pages/ArticlePage.tsx";
import './index.css'
createRoot(document.getElementById('root')!).render(
<BrowserRouter>
<Routes>
// Main page
<Route path="/" element={<MainPage />} />
// Game page
<Route path="/game" element={<GamePage />} />
// Article page (dynamic route)
<Route path="/article/:id" element={<ArticlePage />} />
// Not found
<Route path="*" element={<div>Not Found</div>} />
</Routes>
</BrowserRouter>,
</BrowserRouter>
)