From 41b1dbdf6febc44b162f583eb614fad3ed8891d0 Mon Sep 17 00:00:00 2001
From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>
Date: Wed, 30 Oct 2024 00:57:58 +0300
Subject: frontend: fix switching maps but not updating

---
 frontend/src/pages/Maps.tsx | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

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

diff --git a/frontend/src/pages/Maps.tsx b/frontend/src/pages/Maps.tsx
index 13ee4d9..bc939cf 100644
--- a/frontend/src/pages/Maps.tsx
+++ b/frontend/src/pages/Maps.tsx
@@ -37,8 +37,6 @@ const Maps: React.FC<MapProps> = ({ token, isModerator }) => {
 
   const _fetch_map_leaderboards = async () => {
     const mapLeaderboards = await API.get_map_leaderboard(mapID);
-    console.log("lbs:")
-    console.log(mapLeaderboards);
     setMapLeaderboardData(mapLeaderboards);
   };
 
@@ -51,7 +49,7 @@ const Maps: React.FC<MapProps> = ({ token, isModerator }) => {
     _fetch_map_summary();
     _fetch_map_leaderboards();
     _fetch_map_discussions();
-  }, []);
+  }, [mapID]);
 
   if (!mapSummaryData) {
     // loading placeholder
-- 
cgit v1.2.3

