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.tsx31
1 files changed, 7 insertions, 24 deletions
diff --git a/frontend/src/pages/Games.tsx b/frontend/src/pages/Games.tsx
index 15cc891..5e0d5bf 100644
--- a/frontend/src/pages/Games.tsx
+++ b/frontend/src/pages/Games.tsx
@@ -3,43 +3,26 @@ import { Helmet } from 'react-helmet';
3 3
4import GameEntry from '@components/GameEntry'; 4import GameEntry from '@components/GameEntry';
5import { Game } from '@customTypes/Game'; 5import { Game } from '@customTypes/Game';
6import "@css/Maps.css" 6import gamesCSS from "@css/Games.module.css";
7 7
8interface GamesProps { 8interface GamesProps {
9 games: Game[]; 9 games: Game[];
10} 10}
11 11
12const Games: React.FC<GamesProps> = ({ games }) => { 12const Games: React.FC<GamesProps> = ({ games }) => {
13
14 const _page_load = () => {
15 const loaders = document.querySelectorAll(".loader");
16 loaders.forEach((loader) => {
17 (loader as HTMLElement).style.display = "none";
18 });
19 }
20
21 React.useEffect(() => {
22 document.querySelectorAll(".games-page-item-body").forEach((game, index) => {
23 game.innerHTML = "";
24 });
25 _page_load();
26 }, []);
27
28 return ( 13 return (
29 <div className='games-page'> 14 <main>
30 <Helmet> 15 <Helmet>
31 <title>LPHUB | Games</title> 16 <title>LPHUB | Games</title>
32 </Helmet> 17 </Helmet>
33 <section> 18 <section>
34 <div className='games-page-content'> 19 <div className={gamesCSS.content}>
35 <div className='games-page-item-content'> 20 {games.map((game, index) => (
36 {games.map((game, index) => ( 21 <GameEntry game={game} key={index} />
37 <GameEntry game={game} key={index} /> 22 ))}
38 ))}
39 </div>
40 </div> 23 </div>
41 </section> 24 </section>
42 </div> 25 </main>
43 ); 26 );
44}; 27};
45 28