import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App.tsx'
import './index.css'
import { Result } from 'antd'
import { NavLink, Route, BrowserRouter as Router, Routes } from 'react-router-dom'
import Home from './pages/Home/index.tsx'
import InfoCenter from './pages/Strategy/index.tsx'
import GameIntroduction from './pages/GameIntroduction/index.tsx'
import SystemIntroduction from './pages/SystemIntroduction/index.tsx'
import GameplayIntroduction from './pages/GameplayIntroduction/index.tsx'
import CommonInformation from './pages/CommonInformation/index.tsx'
import News from './pages/News/index.tsx'
import Article from './pages/Article/index.tsx'


ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
  <React.StrictMode>
    <Router>
      <Routes>
        <Route path="/" element={<App />}>
          <Route index element={<Home />} />
          <Route path="gameIntroduction" element={<GameIntroduction />} />
          <Route path="systemIntroduction" element={<SystemIntroduction />} />
          <Route path="gameplayIntroduction" element={<GameplayIntroduction />} />
          <Route path="commonInformation" element={<CommonInformation />} />
          <Route path="news" element={<News />} />
          <Route path="strategy" element={<InfoCenter />} />
          
          <Route path="article" element={<Article />} />
        </Route>
        <Route path="*" element={<Result
          status="404"
          title="404"
          subTitle="Sorry, the page you visited does not exist."
          extra={<NavLink to="/">
            返回首页
          </NavLink>}
        />} />
      </Routes>
    </Router>
  </React.StrictMode>,
)
