aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/components/GameCategory.tsx
diff options
context:
space:
mode:
authorFifthWit <fifthwitbusiness@gmail.com>2025-01-30 10:44:30 -0600
committerFifthWit <fifthwitbusiness@gmail.com>2025-01-30 10:44:30 -0600
commite40f07211f5f15dcb138e2520a76d13afd3c0cfd (patch)
tree46bad6a17e66d55a4a65088c0b6eb8c48641615a /frontend/src/components/GameCategory.tsx
parentadded prettier for more consistency (diff)
downloadlphub-e40f07211f5f15dcb138e2520a76d13afd3c0cfd.tar.gz
lphub-e40f07211f5f15dcb138e2520a76d13afd3c0cfd.tar.bz2
lphub-e40f07211f5f15dcb138e2520a76d13afd3c0cfd.zip
formatted with prettier
Diffstat (limited to 'frontend/src/components/GameCategory.tsx')
-rw-r--r--frontend/src/components/GameCategory.tsx37
1 files changed, 22 insertions, 15 deletions
diff --git a/frontend/src/components/GameCategory.tsx b/frontend/src/components/GameCategory.tsx
index d8879ef..b13be48 100644
--- a/frontend/src/components/GameCategory.tsx
+++ b/frontend/src/components/GameCategory.tsx
@@ -1,24 +1,31 @@
1import React from 'react'; 1import React from 'react';
2import { Link } from "react-router-dom"; 2import { 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';
6 6
7interface GameCategoryProps { 7interface GameCategoryProps {
8 game: Game; 8 game: Game;
9 cat: GameCategoryPortals; 9 cat: GameCategoryPortals;
10} 10}
11 11
12const GameCategory: React.FC<GameCategoryProps> = ({cat, game}) => { 12const GameCategory: React.FC<GameCategoryProps> = ({ cat, game }) => {
13 return ( 13 return (
14 <Link className="games-page-item-body-item" to={"/games/" + game.id + "?cat=" + cat.category.id}> 14 <Link
15 <div> 15 className="games-page-item-body-item"
16 <span className='games-page-item-body-item-title'>{cat.category.name}</span> 16 to={'/games/' + game.id + '?cat=' + cat.category.id}
17 <br /> 17 >
18 <span className='games-page-item-body-item-num'>{cat.portal_count}</span> 18 <div>
19 </div> 19 <span className="games-page-item-body-item-title">
20 </Link> 20 {cat.category.name}
21 ) 21 </span>
22} 22 <br />
23 <span className="games-page-item-body-item-num">
24 {cat.portal_count}
25 </span>
26 </div>
27 </Link>
28 );
29};
23 30
24export default GameCategory; 31export default GameCategory;