diff options
Diffstat (limited to 'frontend/src/pages/Games.tsx')
| -rw-r--r-- | frontend/src/pages/Games.tsx | 55 |
1 files changed, 19 insertions, 36 deletions
diff --git a/frontend/src/pages/Games.tsx b/frontend/src/pages/Games.tsx index 15cc891..8587635 100644 --- a/frontend/src/pages/Games.tsx +++ b/frontend/src/pages/Games.tsx | |||
| @@ -1,46 +1,29 @@ | |||
| 1 | import React from 'react'; | 1 | import React from "react"; |
| 2 | import { Helmet } from 'react-helmet'; | 2 | import { Helmet } from "react-helmet"; |
| 3 | 3 | ||
| 4 | import GameEntry from '@components/GameEntry'; | 4 | import GameEntry from "@components/GameEntry"; |
| 5 | import { Game } from '@customTypes/Game'; | 5 | import { Game } from "@customTypes/Game"; |
| 6 | import "@css/Maps.css" | ||
| 7 | 6 | ||
| 8 | interface GamesProps { | 7 | interface GamesProps { |
| 9 | games: Game[]; | 8 | games: Game[]; |
| 10 | } | 9 | } |
| 11 | 10 | ||
| 12 | const Games: React.FC<GamesProps> = ({ games }) => { | 11 | const Games: React.FC<GamesProps> = ({ games }) => { |
| 13 | 12 | return ( | |
| 14 | const _page_load = () => { | 13 | <div className="ml-20 min-h-screen text-foreground font-[--font-barlow-semicondensed-regular] overflow-y-auto scrollbar-thin"> |
| 15 | const loaders = document.querySelectorAll(".loader"); | 14 | <Helmet> |
| 16 | loaders.forEach((loader) => { | 15 | <title>LPHUB | Games</title> |
| 17 | (loader as HTMLElement).style.display = "none"; | 16 | </Helmet> |
| 18 | }); | 17 | <section className="py-12 px-12 w-full"> |
| 19 | } | 18 | <h1 className="text-3xl font-bold mb-8">Games</h1> |
| 20 | 19 | <div className="flex flex-col w-full"> | |
| 21 | React.useEffect(() => { | 20 | {games.map((game, index) => ( |
| 22 | document.querySelectorAll(".games-page-item-body").forEach((game, index) => { | 21 | <GameEntry game={game} key={index} /> |
| 23 | game.innerHTML = ""; | 22 | ))} |
| 24 | }); | ||
| 25 | _page_load(); | ||
| 26 | }, []); | ||
| 27 | |||
| 28 | return ( | ||
| 29 | <div className='games-page'> | ||
| 30 | <Helmet> | ||
| 31 | <title>LPHUB | Games</title> | ||
| 32 | </Helmet> | ||
| 33 | <section> | ||
| 34 | <div className='games-page-content'> | ||
| 35 | <div className='games-page-item-content'> | ||
| 36 | {games.map((game, index) => ( | ||
| 37 | <GameEntry game={game} key={index} /> | ||
| 38 | ))} | ||
| 39 | </div> | ||
| 40 | </div> | ||
| 41 | </section> | ||
| 42 | </div> | 23 | </div> |
| 43 | ); | 24 | </section> |
| 25 | </div> | ||
| 26 | ); | ||
| 44 | }; | 27 | }; |
| 45 | 28 | ||
| 46 | export default Games; | 29 | export default Games; |