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/pages/Maplist.tsx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

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

diff --git a/frontend/src/pages/Maplist.tsx b/frontend/src/pages/Maplist.tsx
index 5d0c852..9526d18 100644
--- a/frontend/src/pages/Maplist.tsx
+++ b/frontend/src/pages/Maplist.tsx
@@ -64,6 +64,7 @@ const Maplist: React.FC = () => {
       // console.log(foundGame)
       if (foundGame) {
         setGame(foundGame);
+        setLoad(false);
       }
     };
     
@@ -73,9 +74,9 @@ const Maplist: React.FC = () => {
       setNumChapters(games_chapters.chapters.length);
     }
 
+    setLoad(true);
     _fetch_game();
     _fetch_game_chapters();
-    setLoad(true);
   }, []);
 
   useEffect(() => {
@@ -96,7 +97,7 @@ const Maplist: React.FC = () => {
           </button>
         </Link>
       </section>
-      {!load ? (
+      {load ? (
         <div></div>
       ) : (
         <section>
-- 
cgit v1.2.3

