From a7c282ca348c1e8e60559e5c064caee28ba11eec Mon Sep 17 00:00:00 2001
From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>
Date: Wed, 9 Oct 2024 16:34:12 +0300
Subject: refactor: so much shit

---
 frontend/src/components/UploadRunDialog.tsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

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

diff --git a/frontend/src/components/UploadRunDialog.tsx b/frontend/src/components/UploadRunDialog.tsx
index e099a40..aa7ab5a 100644
--- a/frontend/src/components/UploadRunDialog.tsx
+++ b/frontend/src/components/UploadRunDialog.tsx
@@ -42,8 +42,10 @@ const UploadRunDialog: React.FC<UploadRunDialogProps> = ({ open, onClose, mapID,
   };
 
   React.useEffect(() => {
-    _handle_game_select("1"); // a different approach?
-  }, []);
+    if (open) {
+    _handle_game_select("1"); // a different approach?.
+    }
+  }, [open]);
 
   if (open) {
     return (
-- 
cgit v1.2.3

