aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/components')
-rw-r--r--frontend/src/components/GameCategory.tsx8
-rw-r--r--frontend/src/components/GameEntry.tsx9
2 files changed, 10 insertions, 7 deletions
diff --git a/frontend/src/components/GameCategory.tsx b/frontend/src/components/GameCategory.tsx
index d8879ef..80ee416 100644
--- a/frontend/src/components/GameCategory.tsx
+++ b/frontend/src/components/GameCategory.tsx
@@ -3,6 +3,8 @@ import { Link } from "react-router-dom";
3 3
4import { Game, GameCategoryPortals } from '@customTypes/Game'; 4import { Game, GameCategoryPortals } from '@customTypes/Game';
5import "@css/Games.css" 5import "@css/Games.css"
6import games from "@css/Games.module.css";
7import info from "@css/Info.module.css";
6 8
7interface GameCategoryProps { 9interface GameCategoryProps {
8 game: Game; 10 game: Game;
@@ -11,11 +13,11 @@ interface GameCategoryProps {
11 13
12const GameCategory: React.FC<GameCategoryProps> = ({cat, game}) => { 14const GameCategory: React.FC<GameCategoryProps> = ({cat, game}) => {
13 return ( 15 return (
14 <Link className="games-page-item-body-item" to={"/games/" + game.id + "?cat=" + cat.category.id}> 16 <Link className={info.infoBlock} to={"/games/" + game.id + "?cat=" + cat.category.id}>
15 <div> 17 <div>
16 <span className='games-page-item-body-item-title'>{cat.category.name}</span> 18 <span>{cat.category.name}</span>
17 <br /> 19 <br />
18 <span className='games-page-item-body-item-num'>{cat.portal_count}</span> 20 <span>{cat.portal_count}</span>
19 </div> 21 </div>
20 </Link> 22 </Link>
21 ) 23 )
diff --git a/frontend/src/components/GameEntry.tsx b/frontend/src/components/GameEntry.tsx
index 3bd2842..ebba419 100644
--- a/frontend/src/components/GameEntry.tsx
+++ b/frontend/src/components/GameEntry.tsx
@@ -3,6 +3,7 @@ import { Link } from "react-router-dom";
3 3
4import { Game, GameCategoryPortals } from '@customTypes/Game'; 4import { Game, GameCategoryPortals } from '@customTypes/Game';
5import "@css/Games.css" 5import "@css/Games.css"
6import games from "@css/Games.module.css";
6 7
7import GameCategory from '@components/GameCategory'; 8import GameCategory from '@components/GameCategory';
8 9
@@ -18,12 +19,12 @@ const GameEntry: React.FC<GameEntryProps> = ({ game }) => {
18 }, [game.category_portals]); 19 }, [game.category_portals]);
19 20
20 return ( 21 return (
21 <Link to={"/games/" + game.id}><div className='games-page-item'> 22 <Link to={"/games/" + game.id}><div className={games.game}>
22 <div className='games-page-item-header'> 23 <div className={games.header}>
23 <div style={{ backgroundImage: `url(${game.image})` }} className='games-page-item-header-img'></div> 24 <div style={{ backgroundImage: `url(${game.image})` }}></div>
24 <span><b>{game.name}</b></span> 25 <span><b>{game.name}</b></span>
25 </div> 26 </div>
26 <div id={game.id as any as string} className='games-page-item-body'> 27 <div id={game.id as any as string} className={games.infoBlockContainer}>
27 {catInfo.map((cat, index) => { 28 {catInfo.map((cat, index) => {
28 return <GameCategory cat={cat} game={game} key={index}></GameCategory> 29 return <GameCategory cat={cat} game={game} key={index}></GameCategory>
29 })} 30 })}