diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2024-10-09 16:34:12 +0300 |
|---|---|---|
| committer | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2024-10-09 16:34:12 +0300 |
| commit | a7c282ca348c1e8e60559e5c064caee28ba11eec (patch) | |
| tree | 43bd7bdb2bbc80b92b96a14b36c33f0b7df622c9 /frontend/src/pages/Maplist.tsx | |
| parent | Rankings page (diff) | |
| download | lphub-a7c282ca348c1e8e60559e5c064caee28ba11eec.tar.gz lphub-a7c282ca348c1e8e60559e5c064caee28ba11eec.tar.bz2 lphub-a7c282ca348c1e8e60559e5c064caee28ba11eec.zip | |
refactor: so much shit
Diffstat (limited to 'frontend/src/pages/Maplist.tsx')
| -rw-r--r-- | frontend/src/pages/Maplist.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
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 = () => { | |||
| 64 | // console.log(foundGame) | 64 | // console.log(foundGame) |
| 65 | if (foundGame) { | 65 | if (foundGame) { |
| 66 | setGame(foundGame); | 66 | setGame(foundGame); |
| 67 | setLoad(false); | ||
| 67 | } | 68 | } |
| 68 | }; | 69 | }; |
| 69 | 70 | ||
| @@ -73,9 +74,9 @@ const Maplist: React.FC = () => { | |||
| 73 | setNumChapters(games_chapters.chapters.length); | 74 | setNumChapters(games_chapters.chapters.length); |
| 74 | } | 75 | } |
| 75 | 76 | ||
| 77 | setLoad(true); | ||
| 76 | _fetch_game(); | 78 | _fetch_game(); |
| 77 | _fetch_game_chapters(); | 79 | _fetch_game_chapters(); |
| 78 | setLoad(true); | ||
| 79 | }, []); | 80 | }, []); |
| 80 | 81 | ||
| 81 | useEffect(() => { | 82 | useEffect(() => { |
| @@ -96,7 +97,7 @@ const Maplist: React.FC = () => { | |||
| 96 | </button> | 97 | </button> |
| 97 | </Link> | 98 | </Link> |
| 98 | </section> | 99 | </section> |
| 99 | {!load ? ( | 100 | {load ? ( |
| 100 | <div></div> | 101 | <div></div> |
| 101 | ) : ( | 102 | ) : ( |
| 102 | <section> | 103 | <section> |