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>
)
