diff options
Diffstat (limited to 'frontend/src/components/GameEntry.tsx')
| -rw-r--r-- | frontend/src/components/GameEntry.tsx | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/frontend/src/components/GameEntry.tsx b/frontend/src/components/GameEntry.tsx index 3bd2842..b58bbdd 100644 --- a/frontend/src/components/GameEntry.tsx +++ b/frontend/src/components/GameEntry.tsx | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import { Link } from "react-router-dom"; | 2 | import { Link } from 'react-router-dom'; |
| 3 | 3 | ||
| 4 | import { Game, GameCategoryPortals } from '@customTypes/Game'; | 4 | import { Game, GameCategoryPortals } from '@customTypes/Game'; |
| 5 | import "@css/Games.css" | 5 | import '@css/Games.css'; |
| 6 | 6 | ||
| 7 | import GameCategory from '@components/GameCategory'; | 7 | import GameCategory from '@components/GameCategory'; |
| 8 | 8 | ||
| @@ -18,17 +18,26 @@ const GameEntry: React.FC<GameEntryProps> = ({ game }) => { | |||
| 18 | }, [game.category_portals]); | 18 | }, [game.category_portals]); |
| 19 | 19 | ||
| 20 | return ( | 20 | return ( |
| 21 | <Link to={"/games/" + game.id}><div className='games-page-item'> | 21 | <Link to={'/games/' + game.id}> |
| 22 | <div className='games-page-item-header'> | 22 | <div className="games-page-item"> |
| 23 | <div style={{ backgroundImage: `url(${game.image})` }} className='games-page-item-header-img'></div> | 23 | <div className="games-page-item-header"> |
| 24 | <span><b>{game.name}</b></span> | 24 | <div |
| 25 | style={{ backgroundImage: `url(${game.image})` }} | ||
| 26 | className="games-page-item-header-img" | ||
| 27 | ></div> | ||
| 28 | <span> | ||
| 29 | <b>{game.name}</b> | ||
| 30 | </span> | ||
| 31 | </div> | ||
| 32 | <div id={game.id as any as string} className="games-page-item-body"> | ||
| 33 | {catInfo.map((cat, index) => { | ||
| 34 | return ( | ||
| 35 | <GameCategory cat={cat} game={game} key={index}></GameCategory> | ||
| 36 | ); | ||
| 37 | })} | ||
| 38 | </div> | ||
| 25 | </div> | 39 | </div> |
| 26 | <div id={game.id as any as string} className='games-page-item-body'> | 40 | </Link> |
| 27 | {catInfo.map((cat, index) => { | ||
| 28 | return <GameCategory cat={cat} game={game} key={index}></GameCategory> | ||
| 29 | })} | ||
| 30 | </div> | ||
| 31 | </div></Link> | ||
| 32 | ); | 41 | ); |
| 33 | }; | 42 | }; |
| 34 | 43 | ||