aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/pages/Games.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/pages/Games.tsx')
-rw-r--r--frontend/src/pages/Games.tsx26
1 files changed, 5 insertions, 21 deletions
diff --git a/frontend/src/pages/Games.tsx b/frontend/src/pages/Games.tsx
index e7e031e..45dd170 100644
--- a/frontend/src/pages/Games.tsx
+++ b/frontend/src/pages/Games.tsx
@@ -3,36 +3,20 @@ import React from 'react';
3import GameEntry from '@components/GameEntry'; 3import GameEntry from '@components/GameEntry';
4import { Game } from '@customTypes/Game'; 4import { Game } from '@customTypes/Game';
5import "@css/Maps.css" 5import "@css/Maps.css"
6import gamesCSS from "@css/Games.module.css";
6 7
7interface GamesProps { 8interface GamesProps {
8 games: Game[]; 9 games: Game[];
9} 10}
10 11
11const Games: React.FC<GamesProps> = ({ games }) => { 12const Games: React.FC<GamesProps> = ({ games }) => {
12
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.querySelectorAll(".games-page-item-body").forEach((game, index) => {
22 game.innerHTML = "";
23 });
24 _page_load();
25 }, []);
26
27 return ( 13 return (
28 <main> 14 <main>
29 <section> 15 <section>
30 <div className='games-page-content'> 16 <div className={gamesCSS.content}>
31 <div className='games-page-item-content'> 17 {games.map((game, index) => (
32 {games.map((game, index) => ( 18 <GameEntry game={game} key={index} />
33 <GameEntry game={game} key={index} /> 19 ))}
34 ))}
35 </div>
36 </div> 20 </div>
37 </section> 21 </section>
38 </main> 22 </main>