From d8c9769f9d3c8731ff17a3675d98b20ae8ed8681 Mon Sep 17 00:00:00 2001
From: Wolfboy248 <121288977+Wolfboy248@users.noreply.github.com>
Date: Thu, 5 Sep 2024 16:52:08 +0200
Subject: refactor: maplist page

---
 frontend/src/pages/Maplist.tsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'frontend/src/pages/Maplist.tsx')

diff --git a/frontend/src/pages/Maplist.tsx b/frontend/src/pages/Maplist.tsx
index b1b1664..3bc5f74 100644
--- a/frontend/src/pages/Maplist.tsx
+++ b/frontend/src/pages/Maplist.tsx
@@ -1,5 +1,5 @@
 import React, { useEffect } from "react";
-import { Link, useLocation, useParams } from "react-router-dom";
+import { Link, useLocation, useNavigate, useParams } from "react-router-dom";
 
 import "../css/Maplist.css";
 import { API } from "../api/Api";
@@ -23,9 +23,11 @@ const Maplist: React.FC = () => {
 
   const params = useParams<{ id: string }>();
   const location = useLocation();
+  const navigate = useNavigate();
 
   function _update_currently_selected(catNum2: number) {
       setCurrentlySelected(catNum2);
+      navigate("/games/" + game?.id + "?cat=" + catNum2);
       setHasClicked(true);
   }
 
-- 
cgit v1.2.3

