From 441e6e4a8e107172d2743afb58071a4edfc853b6 Mon Sep 17 00:00:00 2001
From: Wolfboy248 <121288977+Wolfboy248@users.noreply.github.com>
Date: Wed, 4 Sep 2024 10:19:24 +0200
Subject: [#189 + #193] Games page fix

---
 frontend/src/components/GameCategory.tsx | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 frontend/src/components/GameCategory.tsx

(limited to 'frontend/src/components/GameCategory.tsx')

diff --git a/frontend/src/components/GameCategory.tsx b/frontend/src/components/GameCategory.tsx
new file mode 100644
index 0000000..3291e09
--- /dev/null
+++ b/frontend/src/components/GameCategory.tsx
@@ -0,0 +1,24 @@
+import React from 'react';
+import { Link } from "react-router-dom";
+
+import { Game, GameCategoryPortals } from '../types/Game';
+import "../css/Games.css"
+
+interface GameCategoryProps {
+    game: Game;
+    cat: GameCategoryPortals;
+}
+
+const GameCategory: React.FC<GameCategoryProps> = ({cat, game}) => {
+    return (
+        <Link className="games-page-item-body-item" to={"/games/" + game.id + "?cat=" + cat.category.id}>
+        <div>
+              <span className='games-page-item-body-item-title'>{cat.category.name}</span>
+              <br />
+              <span className='games-page-item-body-item-num'>{cat.portal_count}</span>
+        </div>
+        </Link>
+    )
+}
+
+export default GameCategory;
-- 
cgit v1.2.3

