aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/pages/Maplist.tsx
diff options
context:
space:
mode:
authorArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2024-09-09 19:29:42 +0300
committerArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2024-09-09 19:29:42 +0300
commit89560a61bc6e41d86acaea596762eda2da38fe50 (patch)
tree1cf4b7c73c17f045d3f4837b480ddf7a61230a94 /frontend/src/pages/Maplist.tsx
parentrefactor: rankings page (diff)
downloadlphub-89560a61bc6e41d86acaea596762eda2da38fe50.tar.gz
lphub-89560a61bc6e41d86acaea596762eda2da38fe50.tar.bz2
lphub-89560a61bc6e41d86acaea596762eda2da38fe50.zip
refactor: upload run form, lots of random shit
Diffstat (limited to 'frontend/src/pages/Maplist.tsx')
-rw-r--r--frontend/src/pages/Maplist.tsx11
1 files changed, 3 insertions, 8 deletions
diff --git a/frontend/src/pages/Maplist.tsx b/frontend/src/pages/Maplist.tsx
index 3bc5f74..5d0c852 100644
--- a/frontend/src/pages/Maplist.tsx
+++ b/frontend/src/pages/Maplist.tsx
@@ -73,14 +73,9 @@ const Maplist: React.FC = () => {
73 setNumChapters(games_chapters.chapters.length); 73 setNumChapters(games_chapters.chapters.length);
74 } 74 }
75 75
76 const _fetch_maps = async () => {
77 const maps = await API.get_games_maps(gameId.toString());
78 setLoad(true);
79 }
80
81 _fetch_game(); 76 _fetch_game();
82 _fetch_game_chapters(); 77 _fetch_game_chapters();
83 _fetch_maps(); 78 setLoad(true);
84 }, []); 79 }, []);
85 80
86 useEffect(() => { 81 useEffect(() => {
@@ -97,7 +92,7 @@ const Maplist: React.FC = () => {
97 <Link to="/games"> 92 <Link to="/games">
98 <button className="nav-button" style={{ borderRadius: "20px" }}> 93 <button className="nav-button" style={{ borderRadius: "20px" }}>
99 <i className="triangle"></i> 94 <i className="triangle"></i>
100 <span>Games list</span> 95 <span>Games List</span>
101 </button> 96 </button>
102 </Link> 97 </Link>
103 </section> 98 </section>
@@ -162,7 +157,7 @@ const Maplist: React.FC = () => {
162 </div> 157 </div>
163 </div> 158 </div>
164 <div className="difficulty-bar"> 159 <div className="difficulty-bar">
165 <span>Difficulty:</span> 160 {/* <span>Difficulty:</span> */}
166 <div className={map.difficulty == 0 ? "one" : map.difficulty == 1 ? "two" : map.difficulty == 2 ? "three" : map.difficulty == 3 ? "four" : map.difficulty == 4 ? "five" : "one"}> 161 <div className={map.difficulty == 0 ? "one" : map.difficulty == 1 ? "two" : map.difficulty == 2 ? "three" : map.difficulty == 3 ? "four" : map.difficulty == 4 ? "five" : "one"}>
167 <div className="difficulty-point"></div> 162 <div className="difficulty-point"></div>
168 <div className="difficulty-point"></div> 163 <div className="difficulty-point"></div>