diff options
| author | Wolfboy248 <121288977+Wolfboy248@users.noreply.github.com> | 2024-07-10 21:51:25 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-10 22:51:25 +0300 |
| commit | cfac59282da55f4791d6352f15887a15e9ff6ec5 (patch) | |
| tree | bf8cea62f60f9239073a9cf82648d69d1e6b6a1c /frontend/src/App.js | |
| parent | feat: return portal counts for each cat in chapter select (#175) (diff) | |
| download | lphub-cfac59282da55f4791d6352f15887a15e9ff6ec5.tar.gz lphub-cfac59282da55f4791d6352f15887a15e9ff6ec5.tar.bz2 lphub-cfac59282da55f4791d6352f15887a15e9ff6ec5.zip | |
Games page, maplist page (#153)
Co-authored-by: Wolfboy248 <105884620+Wolfboy248@users.noreply.github.com>
Diffstat (limited to '')
| -rw-r--r-- | frontend/src/App.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/frontend/src/App.js b/frontend/src/App.js index 93652e6..b7bfeb3 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js | |||
| @@ -8,10 +8,13 @@ import "./App.css"; | |||
| 8 | import Summary from "./components/pages/summary.js" | 8 | import Summary from "./components/pages/summary.js" |
| 9 | import Profile from "./components/pages/profile.js" | 9 | import Profile from "./components/pages/profile.js" |
| 10 | import About from './components/pages/about.js'; | 10 | import About from './components/pages/about.js'; |
| 11 | import Games from "./components/pages/games.js"; | ||
| 12 | import Maplist from './components/pages/maplist.js'; | ||
| 13 | import Home from "./components/pages/maplist.js"; | ||
| 14 | import Homepage from './components/pages/home.js'; | ||
| 11 | 15 | ||
| 12 | 16 | ||
| 13 | export default function App() { | 17 | export default function App() { |
| 14 | |||
| 15 | const [token, setToken] = React.useState(null); | 18 | const [token, setToken] = React.useState(null); |
| 16 | const [mod,setMod] = React.useState(false) | 19 | const [mod,setMod] = React.useState(false) |
| 17 | React.useEffect(()=>{ | 20 | React.useEffect(()=>{ |
| @@ -25,7 +28,7 @@ export default function App() { | |||
| 25 | <BrowserRouter> | 28 | <BrowserRouter> |
| 26 | <Sidebar token={token} setToken={setToken}/> | 29 | <Sidebar token={token} setToken={setToken}/> |
| 27 | <Routes> | 30 | <Routes> |
| 28 | <Route index element={<Main text="Homepage"/>}></Route> | 31 | <Route index element={<Homepage token={token} mod={mod}/>}></Route> |
| 29 | <Route path="/news" element={<Main text="News"/>}></Route> | 32 | <Route path="/news" element={<Main text="News"/>}></Route> |
| 30 | <Route path="/records" element={<Main text="Records"/>}></Route> | 33 | <Route path="/records" element={<Main text="Records"/>}></Route> |
| 31 | <Route path="/leaderboards" element={<Main text="Leaderboards"/>}></Route> | 34 | <Route path="/leaderboards" element={<Main text="Leaderboards"/>}></Route> |
| @@ -36,6 +39,8 @@ export default function App() { | |||
| 36 | <Route path="/rules" element={<Main text="Rules"/>}></Route> | 39 | <Route path="/rules" element={<Main text="Rules"/>}></Route> |
| 37 | <Route path="/about" element={<About/>}></Route> | 40 | <Route path="/about" element={<About/>}></Route> |
| 38 | <Route path="/maps/*" element={<Summary token={token} mod={mod}/>}></Route> | 41 | <Route path="/maps/*" element={<Summary token={token} mod={mod}/>}></Route> |
| 42 | <Route path="/games" element={<Games/>}></Route> | ||
| 43 | <Route path="/games/game" element={<Maplist token={token} mod={mod} />}></Route> | ||
| 39 | <Route path="*" element={<Main text="404 Page not found"/>}></Route> | 44 | <Route path="*" element={<Main text="404 Page not found"/>}></Route> |
| 40 | </Routes> | 45 | </Routes> |
| 41 | </BrowserRouter> | 46 | </BrowserRouter> |