diff options
Diffstat (limited to 'frontend/src/pages/Games.tsx')
| -rw-r--r-- | frontend/src/pages/Games.tsx | 32 |
1 files changed, 7 insertions, 25 deletions
diff --git a/frontend/src/pages/Games.tsx b/frontend/src/pages/Games.tsx index d7dacde..1ef0f57 100644 --- a/frontend/src/pages/Games.tsx +++ b/frontend/src/pages/Games.tsx | |||
| @@ -3,41 +3,23 @@ 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 | const _page_load = () => { | ||
| 14 | const loaders = document.querySelectorAll(".loader"); | ||
| 15 | loaders.forEach(loader => { | ||
| 16 | (loader as HTMLElement).style.display = "none"; | ||
| 17 | }); | ||
| 18 | }; | ||
| 19 | |||
| 20 | React.useEffect(() => { | ||
| 21 | document | ||
| 22 | .querySelectorAll(".games-page-item-body") | ||
| 23 | .forEach((game, index) => { | ||
| 24 | game.innerHTML = ""; | ||
| 25 | }); | ||
| 26 | _page_load(); | ||
| 27 | }, []); | ||
| 28 | |||
| 29 | return ( | 12 | return ( |
| 30 | <div className="games-page"> | 13 | <div className="ml-10 min-h-screen w-[calc(100%-320px)] text-foreground font-[--font-barlow-semicondensed-regular] overflow-y-auto scrollbar-thin"> |
| 31 | <Helmet> | 14 | <Helmet> |
| 32 | <title>LPHUB | Games</title> | 15 | <title>LPHUB | Games</title> |
| 33 | </Helmet> | 16 | </Helmet> |
| 34 | <section> | 17 | <section className="py-12 px-12 w-full"> |
| 35 | <div className="games-page-content"> | 18 | <h1 className="text-3xl font-bold mb-8">Games</h1> |
| 36 | <div className="games-page-item-content"> | 19 | <div className="flex flex-col w-full"> |
| 37 | {games.map((game, index) => ( | 20 | {games.map((game, index) => ( |
| 38 | <GameEntry game={game} key={index} /> | 21 | <GameEntry game={game} key={index} /> |
| 39 | ))} | 22 | ))} |
| 40 | </div> | ||
| 41 | </div> | 23 | </div> |
| 42 | </section> | 24 | </section> |
| 43 | </div> | 25 | </div> |