aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/components
diff options
context:
space:
mode:
authorArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2024-10-09 16:34:12 +0300
committerArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2024-10-09 16:34:12 +0300
commita7c282ca348c1e8e60559e5c064caee28ba11eec (patch)
tree43bd7bdb2bbc80b92b96a14b36c33f0b7df622c9 /frontend/src/components
parentRankings page (diff)
downloadlphub-a7c282ca348c1e8e60559e5c064caee28ba11eec.tar.gz
lphub-a7c282ca348c1e8e60559e5c064caee28ba11eec.tar.bz2
lphub-a7c282ca348c1e8e60559e5c064caee28ba11eec.zip
refactor: so much shit
Diffstat (limited to 'frontend/src/components')
-rw-r--r--frontend/src/components/Discussions.tsx45
-rw-r--r--frontend/src/components/Leaderboards.tsx6
-rw-r--r--frontend/src/components/Login.tsx1923
-rw-r--r--frontend/src/components/ModMenu.tsx44
-rw-r--r--frontend/src/components/RankingEntry.tsx2
-rw-r--r--frontend/src/components/Sidebar.tsx2
-rw-r--r--frontend/src/components/UploadRunDialog.tsx6
7 files changed, 112 insertions, 1916 deletions
diff --git a/frontend/src/components/Discussions.tsx b/frontend/src/components/Discussions.tsx
index 787104b..c22de79 100644
--- a/frontend/src/components/Discussions.tsx
+++ b/frontend/src/components/Discussions.tsx
@@ -8,13 +8,14 @@ import "../css/Maps.css"
8import { Link } from 'react-router-dom'; 8import { Link } from 'react-router-dom';
9 9
10interface DiscussionsProps { 10interface DiscussionsProps {
11 token?: string
11 data?: MapDiscussions; 12 data?: MapDiscussions;
12 isModerator: boolean; 13 isModerator: boolean;
13 mapID: string; 14 mapID: string;
14 onRefresh: () => void; 15 onRefresh: () => void;
15} 16}
16 17
17const Discussions: React.FC<DiscussionsProps> = ({ data, isModerator, mapID, onRefresh }) => { 18const Discussions: React.FC<DiscussionsProps> = ({ token, data, isModerator, mapID, onRefresh }) => {
18 19
19 const [discussionThread, setDiscussionThread] = React.useState<MapDiscussion | undefined>(undefined); 20 const [discussionThread, setDiscussionThread] = React.useState<MapDiscussion | undefined>(undefined);
20 const [discussionSearch, setDiscussionSearch] = React.useState<string>(""); 21 const [discussionSearch, setDiscussionSearch] = React.useState<string>("");
@@ -24,9 +25,7 @@ const Discussions: React.FC<DiscussionsProps> = ({ data, isModerator, mapID, onR
24 title: "", 25 title: "",
25 content: "", 26 content: "",
26 }); 27 });
27 const [createDiscussionCommentContent, setCreateDiscussionCommentContent] = React.useState<MapDiscussionCommentContent>({ 28 const [createDiscussionCommentContent, setCreateDiscussionCommentContent] = React.useState<string>("");
28 comment: "",
29 });
30 29
31 const _open_map_discussion = async (discussion_id: number) => { 30 const _open_map_discussion = async (discussion_id: number) => {
32 const mapDiscussion = await API.get_map_discussion(mapID, discussion_id); 31 const mapDiscussion = await API.get_map_discussion(mapID, discussion_id);
@@ -34,20 +33,26 @@ const Discussions: React.FC<DiscussionsProps> = ({ data, isModerator, mapID, onR
34 }; 33 };
35 34
36 const _create_map_discussion = async () => { 35 const _create_map_discussion = async () => {
37 await API.post_map_discussion(mapID, createDiscussionContent); 36 if (token) {
38 setCreateDiscussion(false); 37 await API.post_map_discussion(token, mapID, createDiscussionContent);
39 onRefresh(); 38 setCreateDiscussion(false);
39 onRefresh();
40 }
40 }; 41 };
41 42
42 const _create_map_discussion_comment = async (discussion_id: number) => { 43 const _create_map_discussion_comment = async (discussion_id: number) => {
43 await API.post_map_discussion_comment(mapID, discussion_id, createDiscussionCommentContent); 44 if (token) {
44 await _open_map_discussion(discussion_id); 45 await API.post_map_discussion_comment(token, mapID, discussion_id, createDiscussionCommentContent);
46 await _open_map_discussion(discussion_id);
47 }
45 }; 48 };
46 49
47 const _delete_map_discussion = async (discussion: MapDiscussionsDetail) => { 50 const _delete_map_discussion = async (discussion: MapDiscussionsDetail) => {
48 if (window.confirm(`Are you sure you want to remove post: ${discussion.title}?`)) { 51 if (window.confirm(`Are you sure you want to remove post: ${discussion.title}?`)) {
49 await API.delete_map_discussion(mapID, discussion.id); 52 if (token) {
50 onRefresh(); 53 await API.delete_map_discussion(token, mapID, discussion.id);
54 onRefresh();
55 }
51 } 56 }
52 }; 57 };
53 58
@@ -69,9 +74,9 @@ const Discussions: React.FC<DiscussionsProps> = ({ data, isModerator, mapID, onR
69 ...createDiscussionContent, 74 ...createDiscussionContent,
70 title: e.target.value, 75 title: e.target.value,
71 })} /> 76 })} />
72 <input id='discussion-create-content' placeholder='Enter the comment...' onChange={(e) => setCreateDiscussionContent({ 77 <input id='discussion-create-content' placeholder='Enter the content...' onChange={(e) => setCreateDiscussionContent({
73 ...createDiscussionContent, 78 ...createDiscussionContent,
74 title: e.target.value, 79 content: e.target.value,
75 })} /> 80 })} />
76 </div> 81 </div>
77 <div style={{ placeItems: "end", gridColumn: "1 / span 2" }}> 82 <div style={{ placeItems: "end", gridColumn: "1 / span 2" }}>
@@ -114,11 +119,15 @@ const Discussions: React.FC<DiscussionsProps> = ({ data, isModerator, mapID, onR
114 } 119 }
115 </div> 120 </div>
116 <div id='discussion-send'> 121 <div id='discussion-send'>
117 <input type="text" placeholder={"Message"} onKeyDown={(e) => e.key === "Enter" && _create_map_discussion_comment(discussionThread.discussion.id)} onChange={(e) => setCreateDiscussionCommentContent({ 122 <input type="text" value={createDiscussionCommentContent} placeholder={"Message"}
118 ...createDiscussionContent, 123 onKeyDown={(e) => e.key === "Enter" && _create_map_discussion_comment(discussionThread.discussion.id)}
119 comment: e.target.value, 124 onChange={(e) => setCreateDiscussionCommentContent(e.target.value)} />
120 })} /> 125 <div><button onClick={() => {
121 <div><button onClick={() => _create_map_discussion_comment(discussionThread.discussion.id)}>Send</button></div> 126 if (createDiscussionCommentContent !== "") {
127 _create_map_discussion_comment(discussionThread.discussion.id);
128 setCreateDiscussionCommentContent("");
129 }
130 }}>Send</button></div>
122 </div> 131 </div>
123 132
124 </div> 133 </div>
diff --git a/frontend/src/components/Leaderboards.tsx b/frontend/src/components/Leaderboards.tsx
index 159f3ed..f4d666d 100644
--- a/frontend/src/components/Leaderboards.tsx
+++ b/frontend/src/components/Leaderboards.tsx
@@ -88,14 +88,14 @@ const Leaderboards: React.FC<LeaderboardsProps> = ({ data }) => {
88 {r.kind === "multiplayer" ? ( 88 {r.kind === "multiplayer" ? (
89 <span> 89 <span>
90 <button onClick={() => { window.alert(`Host demo ID: ${r.host_demo_id} \nParnter demo ID: ${r.partner_demo_id}`) }}><img src={ThreedotIcon} alt="demo_id" /></button> 90 <button onClick={() => { window.alert(`Host demo ID: ${r.host_demo_id} \nParnter demo ID: ${r.partner_demo_id}`) }}><img src={ThreedotIcon} alt="demo_id" /></button>
91 <button onClick={() => window.location.href = `https://lp.ardapektezol.com/api/v1/demos?uuid=${r.partner_demo_id}`}><img src={DownloadIcon} alt="download" style={{ filter: "hue-rotate(160deg) contrast(60%) saturate(1000%)" }} /></button> 91 <button onClick={() => window.location.href = `/api/v1/demos?uuid=${r.partner_demo_id}`}><img src={DownloadIcon} alt="download" style={{ filter: "hue-rotate(160deg) contrast(60%) saturate(1000%)" }} /></button>
92 <button onClick={() => window.location.href = `https://lp.ardapektezol.com/api/v1/demos?uuid=${r.host_demo_id}`}><img src={DownloadIcon} alt="download" style={{ filter: "hue-rotate(300deg) contrast(60%) saturate(1000%)" }} /></button> 92 <button onClick={() => window.location.href = `/api/v1/demos?uuid=${r.host_demo_id}`}><img src={DownloadIcon} alt="download" style={{ filter: "hue-rotate(300deg) contrast(60%) saturate(1000%)" }} /></button>
93 </span> 93 </span>
94 ) : r.kind === "singleplayer" && ( 94 ) : r.kind === "singleplayer" && (
95 95
96 <span> 96 <span>
97 <button onClick={() => { window.alert(`Demo ID: ${r.demo_id}`) }}><img src={ThreedotIcon} alt="demo_id" /></button> 97 <button onClick={() => { window.alert(`Demo ID: ${r.demo_id}`) }}><img src={ThreedotIcon} alt="demo_id" /></button>
98 <button onClick={() => window.location.href = `https://lp.ardapektezol.com/api/v1/demos?uuid=${r.demo_id}`}><img src={DownloadIcon} alt="download" /></button> 98 <button onClick={() => window.location.href = `/api/v1/demos?uuid=${r.demo_id}`}><img src={DownloadIcon} alt="download" /></button>
99 </span> 99 </span>
100 )} 100 )}
101 </span> 101 </span>
diff --git a/frontend/src/components/Login.tsx b/frontend/src/components/Login.tsx
index 367dc72..a8c5503 100644
--- a/frontend/src/components/Login.tsx
+++ b/frontend/src/components/Login.tsx
@@ -7,22 +7,25 @@ import { API } from '../api/Api';
7import "../css/Login.css"; 7import "../css/Login.css";
8 8
9interface LoginProps { 9interface LoginProps {
10 token?: string;
11 setToken: React.Dispatch<React.SetStateAction<string | undefined>>; 10 setToken: React.Dispatch<React.SetStateAction<string | undefined>>;
12 profile?: UserProfile; 11 profile?: UserProfile;
13 setProfile: React.Dispatch<React.SetStateAction<UserProfile | undefined>>; 12 setProfile: React.Dispatch<React.SetStateAction<UserProfile | undefined>>;
14}; 13};
15 14
16const Login: React.FC<LoginProps> = ({ token, setToken, profile, setProfile }) => { 15const Login: React.FC<LoginProps> = ({ setToken, profile, setProfile }) => {
17 16
18 const navigate = useNavigate(); 17 const navigate = useNavigate();
19 18
19 const _login = () => {
20 window.location.href = "/api/v1/login";
21 };
22
20 const _logout = () => { 23 const _logout = () => {
21 setProfile(undefined); 24 setProfile(undefined);
22 setToken(undefined); 25 setToken(undefined);
23 API.user_logout(); 26 API.delete_token();
24 navigate("/"); 27 navigate("/");
25 } 28 };
26 29
27 return ( 30 return (
28 <> 31 <>
@@ -30,1893 +33,41 @@ const Login: React.FC<LoginProps> = ({ token, setToken, profile, setProfile }) =
30 ? 33 ?
31 ( 34 (
32 <> 35 <>
33 <Link to="/profile" tabIndex={-1} className='login'> 36 {profile.profile ?
34 <button className='sidebar-button'> 37 (
35 <img src={profile.avatar_link} alt="" /> 38 <>
36 <span>{profile.user_name}</span> 39 <Link to="/profile" tabIndex={-1} className='login'>
37 </button> 40 <button className='sidebar-button'>
38 <button className='logout-button' onClick={_logout}> 41 <img src={profile.avatar_link} alt="" />
39 <img src={ExitIcon} alt="" /><span></span> 42 <span>{profile.user_name}</span>
40 </button> 43 </button>
41 </Link> 44 <button className='logout-button' onClick={_logout}>
45 <img src={ExitIcon} alt="" /><span />
46 </button>
47 </Link>
48 </>
49 )
50 :
51 (
52 <>
53 <Link to="/" tabIndex={-1} className='login'>
54 <button className='sidebar-button'>
55 <img src={profile.avatar_link} alt="" />
56 <span>Loading Profile...</span>
57 </button>
58 <button disabled className='logout-button' onClick={_logout}>
59 <img src={ExitIcon} alt="" /><span />
60 </button>
61 </Link>
62 </>
63 )
64 }
42 </> 65 </>
43 ) 66 )
44 : 67 :
45 ( 68 (
46 <Link to="/api/v1/login" tabIndex={-1} className='login' > 69 <Link to="/api/v1/login" tabIndex={-1} className='login' >
47 <button className='sidebar-button' onClick={() => { 70 <button className='sidebar-button' onClick={_login}>
48 setProfile({
49 "profile": true,
50 "steam_id": "76561198131629989",
51 "user_name": "BiSaXa",
52 "avatar_link": "https://avatars.steamstatic.com/fa7f64c79b247c8a80cafbd6dd8033b98cc1153c_full.jpg",
53 "country_code": "TR",
54 "titles": [
55 {
56 "name": "Admin",
57 "color": "ce6000"
58 },
59 {
60 "name": "Moderator",
61 "color": "4a8b00"
62 }
63 ],
64 "links": {
65 "p2sr": "-",
66 "steam": "-",
67 "youtube": "-",
68 "twitch": "-"
69 },
70 "rankings": {
71 "overall": {
72 "rank": 1,
73 "completion_count": 4,
74 "completion_total": 105
75 },
76 "singleplayer": {
77 "rank": 1,
78 "completion_count": 3,
79 "completion_total": 57
80 },
81 "cooperative": {
82 "rank": 1,
83 "completion_count": 1,
84 "completion_total": 48
85 }
86 },
87 "records": [
88 {
89 "game_id": 1,
90 "category_id": 1,
91 "map_id": 3,
92 "map_name": "Portal Gun",
93 "map_wr_count": 0,
94 "placement": 1,
95 "scores": [
96 {
97 "record_id": 350,
98 "demo_id": "e9ec0b83-7b95-4fa9-b974-2245fb79d5ca",
99 "score_count": 0,
100 "score_time": 3968,
101 "date": "2023-09-23T14:57:35.430781Z"
102 },
103 {
104 "record_id": 282,
105 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
106 "score_count": 31,
107 "score_time": 9999,
108 "date": "2023-09-03T19:09:11.602056Z"
109 }
110 ]
111 },
112 {
113 "game_id": 1,
114 "category_id": 1,
115 "map_id": 4,
116 "map_name": "Smooth Jazz",
117 "map_wr_count": 0,
118 "placement": 1,
119 "scores": [
120 {
121 "record_id": 283,
122 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
123 "score_count": 31,
124 "score_time": 9999,
125 "date": "2023-09-03T19:09:11.602056Z"
126 }
127 ]
128 },
129 {
130 "game_id": 1,
131 "category_id": 1,
132 "map_id": 5,
133 "map_name": "Cube Momentum",
134 "map_wr_count": 0,
135 "placement": 1,
136 "scores": [
137 {
138 "record_id": 284,
139 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
140 "score_count": 31,
141 "score_time": 9999,
142 "date": "2023-09-03T19:09:11.602056Z"
143 }
144 ]
145 },
146 {
147 "game_id": 1,
148 "category_id": 1,
149 "map_id": 6,
150 "map_name": "Future Starter",
151 "map_wr_count": 0,
152 "placement": 1,
153 "scores": [
154 {
155 "record_id": 351,
156 "demo_id": "d5ee2227-e195-4e8d-bd1d-746b17538df7",
157 "score_count": 2,
158 "score_time": 71378,
159 "date": "2023-09-23T15:11:16.579757Z"
160 },
161 {
162 "record_id": 285,
163 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
164 "score_count": 31,
165 "score_time": 9999,
166 "date": "2023-09-03T19:09:11.602056Z"
167 }
168 ]
169 },
170 {
171 "game_id": 1,
172 "category_id": 1,
173 "map_id": 7,
174 "map_name": "Secret Panel",
175 "map_wr_count": 0,
176 "placement": 1,
177 "scores": [
178 {
179 "record_id": 352,
180 "demo_id": "64ca612d-4586-40df-9cf3-850c270b5592",
181 "score_count": 0,
182 "score_time": 10943,
183 "date": "2023-09-23T15:19:15.413596Z"
184 },
185 {
186 "record_id": 286,
187 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
188 "score_count": 31,
189 "score_time": 9999,
190 "date": "2023-09-03T19:09:11.602056Z"
191 }
192 ]
193 },
194 {
195 "game_id": 1,
196 "category_id": 1,
197 "map_id": 9,
198 "map_name": "Incinerator",
199 "map_wr_count": 0,
200 "placement": 1,
201 "scores": [
202 {
203 "record_id": 287,
204 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
205 "score_count": 31,
206 "score_time": 9999,
207 "date": "2023-09-03T19:09:11.602056Z"
208 }
209 ]
210 },
211 {
212 "game_id": 1,
213 "category_id": 2,
214 "map_id": 10,
215 "map_name": "Laser Intro",
216 "map_wr_count": 0,
217 "placement": 1,
218 "scores": [
219 {
220 "record_id": 288,
221 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
222 "score_count": 31,
223 "score_time": 9999,
224 "date": "2023-09-03T19:09:11.602056Z"
225 }
226 ]
227 },
228 {
229 "game_id": 1,
230 "category_id": 2,
231 "map_id": 11,
232 "map_name": "Laser Stairs",
233 "map_wr_count": 0,
234 "placement": 1,
235 "scores": [
236 {
237 "record_id": 289,
238 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
239 "score_count": 31,
240 "score_time": 9999,
241 "date": "2023-09-03T19:09:11.602056Z"
242 }
243 ]
244 },
245 {
246 "game_id": 1,
247 "category_id": 2,
248 "map_id": 12,
249 "map_name": "Dual Lasers",
250 "map_wr_count": 0,
251 "placement": 1,
252 "scores": [
253 {
254 "record_id": 290,
255 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
256 "score_count": 31,
257 "score_time": 9999,
258 "date": "2023-09-03T19:09:11.602056Z"
259 }
260 ]
261 },
262 {
263 "game_id": 1,
264 "category_id": 2,
265 "map_id": 13,
266 "map_name": "Laser Over Goo",
267 "map_wr_count": 0,
268 "placement": 1,
269 "scores": [
270 {
271 "record_id": 291,
272 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
273 "score_count": 31,
274 "score_time": 9999,
275 "date": "2023-09-03T19:09:11.602056Z"
276 }
277 ]
278 },
279 {
280 "game_id": 1,
281 "category_id": 2,
282 "map_id": 14,
283 "map_name": "Catapult Intro",
284 "map_wr_count": 0,
285 "placement": 1,
286 "scores": [
287 {
288 "record_id": 338,
289 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
290 "score_count": 31,
291 "score_time": 9999,
292 "date": "2023-09-03T19:09:11.602056Z"
293 }
294 ]
295 },
296 {
297 "game_id": 1,
298 "category_id": 2,
299 "map_id": 15,
300 "map_name": "Trust Fling",
301 "map_wr_count": 0,
302 "placement": 1,
303 "scores": [
304 {
305 "record_id": 292,
306 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
307 "score_count": 31,
308 "score_time": 9999,
309 "date": "2023-09-03T19:09:11.602056Z"
310 }
311 ]
312 },
313 {
314 "game_id": 1,
315 "category_id": 2,
316 "map_id": 16,
317 "map_name": "Pit Flings",
318 "map_wr_count": 0,
319 "placement": 1,
320 "scores": [
321 {
322 "record_id": 293,
323 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
324 "score_count": 31,
325 "score_time": 9999,
326 "date": "2023-09-03T19:09:11.602056Z"
327 }
328 ]
329 },
330 {
331 "game_id": 1,
332 "category_id": 2,
333 "map_id": 17,
334 "map_name": "Fizzler Intro",
335 "map_wr_count": 0,
336 "placement": 1,
337 "scores": [
338 {
339 "record_id": 294,
340 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
341 "score_count": 31,
342 "score_time": 9999,
343 "date": "2023-09-03T19:09:11.602056Z"
344 }
345 ]
346 },
347 {
348 "game_id": 1,
349 "category_id": 3,
350 "map_id": 18,
351 "map_name": "Ceiling Catapult",
352 "map_wr_count": 0,
353 "placement": 1,
354 "scores": [
355 {
356 "record_id": 295,
357 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
358 "score_count": 31,
359 "score_time": 9999,
360 "date": "2023-09-03T19:09:11.602056Z"
361 }
362 ]
363 },
364 {
365 "game_id": 1,
366 "category_id": 3,
367 "map_id": 19,
368 "map_name": "Ricochet",
369 "map_wr_count": 0,
370 "placement": 1,
371 "scores": [
372 {
373 "record_id": 296,
374 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
375 "score_count": 31,
376 "score_time": 9999,
377 "date": "2023-09-03T19:09:11.602056Z"
378 }
379 ]
380 },
381 {
382 "game_id": 1,
383 "category_id": 3,
384 "map_id": 20,
385 "map_name": "Bridge Intro",
386 "map_wr_count": 0,
387 "placement": 1,
388 "scores": [
389 {
390 "record_id": 297,
391 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
392 "score_count": 31,
393 "score_time": 9999,
394 "date": "2023-09-03T19:09:11.602056Z"
395 }
396 ]
397 },
398 {
399 "game_id": 1,
400 "category_id": 3,
401 "map_id": 21,
402 "map_name": "Bridge The Gap",
403 "map_wr_count": 0,
404 "placement": 1,
405 "scores": [
406 {
407 "record_id": 298,
408 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
409 "score_count": 31,
410 "score_time": 9999,
411 "date": "2023-09-03T19:09:11.602056Z"
412 }
413 ]
414 },
415 {
416 "game_id": 1,
417 "category_id": 3,
418 "map_id": 22,
419 "map_name": "Turret Intro",
420 "map_wr_count": 0,
421 "placement": 1,
422 "scores": [
423 {
424 "record_id": 299,
425 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
426 "score_count": 31,
427 "score_time": 9999,
428 "date": "2023-09-03T19:09:11.602056Z"
429 }
430 ]
431 },
432 {
433 "game_id": 1,
434 "category_id": 3,
435 "map_id": 23,
436 "map_name": "Laser Relays",
437 "map_wr_count": 0,
438 "placement": 1,
439 "scores": [
440 {
441 "record_id": 300,
442 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
443 "score_count": 31,
444 "score_time": 9999,
445 "date": "2023-09-03T19:09:11.602056Z"
446 }
447 ]
448 },
449 {
450 "game_id": 1,
451 "category_id": 3,
452 "map_id": 24,
453 "map_name": "Turret Blocker",
454 "map_wr_count": 0,
455 "placement": 1,
456 "scores": [
457 {
458 "record_id": 301,
459 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
460 "score_count": 31,
461 "score_time": 9999,
462 "date": "2023-09-03T19:09:11.602056Z"
463 }
464 ]
465 },
466 {
467 "game_id": 1,
468 "category_id": 3,
469 "map_id": 25,
470 "map_name": "Laser vs Turret",
471 "map_wr_count": 0,
472 "placement": 1,
473 "scores": [
474 {
475 "record_id": 302,
476 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
477 "score_count": 31,
478 "score_time": 9999,
479 "date": "2023-09-03T19:09:11.602056Z"
480 }
481 ]
482 },
483 {
484 "game_id": 1,
485 "category_id": 3,
486 "map_id": 26,
487 "map_name": "Pull The Rug",
488 "map_wr_count": 0,
489 "placement": 2,
490 "scores": [
491 {
492 "record_id": 303,
493 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
494 "score_count": 31,
495 "score_time": 9999,
496 "date": "2023-09-03T19:09:11.602056Z"
497 }
498 ]
499 },
500 {
501 "game_id": 1,
502 "category_id": 4,
503 "map_id": 27,
504 "map_name": "Column Blocker",
505 "map_wr_count": 0,
506 "placement": 1,
507 "scores": [
508 {
509 "record_id": 304,
510 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
511 "score_count": 31,
512 "score_time": 9999,
513 "date": "2023-09-03T19:09:11.602056Z"
514 }
515 ]
516 },
517 {
518 "game_id": 1,
519 "category_id": 4,
520 "map_id": 28,
521 "map_name": "Laser Chaining",
522 "map_wr_count": 0,
523 "placement": 1,
524 "scores": [
525 {
526 "record_id": 305,
527 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
528 "score_count": 31,
529 "score_time": 9999,
530 "date": "2023-09-03T19:09:11.602056Z"
531 }
532 ]
533 },
534 {
535 "game_id": 1,
536 "category_id": 4,
537 "map_id": 29,
538 "map_name": "Triple Laser",
539 "map_wr_count": 0,
540 "placement": 2,
541 "scores": [
542 {
543 "record_id": 337,
544 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
545 "score_count": 31,
546 "score_time": 9999,
547 "date": "2023-09-03T19:09:11.602056Z"
548 }
549 ]
550 },
551 {
552 "game_id": 1,
553 "category_id": 4,
554 "map_id": 30,
555 "map_name": "Jail Break",
556 "map_wr_count": 0,
557 "placement": 1,
558 "scores": [
559 {
560 "record_id": 306,
561 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
562 "score_count": 31,
563 "score_time": 9999,
564 "date": "2023-09-03T19:09:11.602056Z"
565 }
566 ]
567 },
568 {
569 "game_id": 1,
570 "category_id": 4,
571 "map_id": 31,
572 "map_name": "Escape",
573 "map_wr_count": 0,
574 "placement": 1,
575 "scores": [
576 {
577 "record_id": 307,
578 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
579 "score_count": 31,
580 "score_time": 9999,
581 "date": "2023-09-03T19:09:11.602056Z"
582 }
583 ]
584 },
585 {
586 "game_id": 1,
587 "category_id": 5,
588 "map_id": 32,
589 "map_name": "Turret Factory",
590 "map_wr_count": 0,
591 "placement": 1,
592 "scores": [
593 {
594 "record_id": 308,
595 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
596 "score_count": 31,
597 "score_time": 9999,
598 "date": "2023-09-03T19:09:11.602056Z"
599 }
600 ]
601 },
602 {
603 "game_id": 1,
604 "category_id": 5,
605 "map_id": 33,
606 "map_name": "Turret Sabotage",
607 "map_wr_count": 0,
608 "placement": 1,
609 "scores": [
610 {
611 "record_id": 309,
612 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
613 "score_count": 31,
614 "score_time": 9999,
615 "date": "2023-09-03T19:09:11.602056Z"
616 }
617 ]
618 },
619 {
620 "game_id": 1,
621 "category_id": 5,
622 "map_id": 34,
623 "map_name": "Neurotoxin Sabotage",
624 "map_wr_count": 0,
625 "placement": 1,
626 "scores": [
627 {
628 "record_id": 310,
629 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
630 "score_count": 31,
631 "score_time": 9999,
632 "date": "2023-09-03T19:09:11.602056Z"
633 }
634 ]
635 },
636 {
637 "game_id": 1,
638 "category_id": 5,
639 "map_id": 35,
640 "map_name": "Core",
641 "map_wr_count": 2,
642 "placement": 1,
643 "scores": [
644 {
645 "record_id": 311,
646 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
647 "score_count": 31,
648 "score_time": 9999,
649 "date": "2023-09-03T19:09:11.602056Z"
650 }
651 ]
652 },
653 {
654 "game_id": 1,
655 "category_id": 6,
656 "map_id": 36,
657 "map_name": "Underground",
658 "map_wr_count": 0,
659 "placement": 1,
660 "scores": [
661 {
662 "record_id": 353,
663 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
664 "score_count": 31,
665 "score_time": 9999,
666 "date": "2023-09-03T19:09:11.602056Z"
667 }
668 ]
669 },
670 {
671 "game_id": 1,
672 "category_id": 6,
673 "map_id": 37,
674 "map_name": "Cave Johnson",
675 "map_wr_count": 0,
676 "placement": 1,
677 "scores": [
678 {
679 "record_id": 313,
680 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
681 "score_count": 31,
682 "score_time": 9999,
683 "date": "2023-09-03T19:09:11.602056Z"
684 }
685 ]
686 },
687 {
688 "game_id": 1,
689 "category_id": 6,
690 "map_id": 38,
691 "map_name": "Repulsion Intro",
692 "map_wr_count": 0,
693 "placement": 2,
694 "scores": [
695 {
696 "record_id": 314,
697 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
698 "score_count": 31,
699 "score_time": 9999,
700 "date": "2023-09-03T19:09:11.602056Z"
701 }
702 ]
703 },
704 {
705 "game_id": 1,
706 "category_id": 6,
707 "map_id": 39,
708 "map_name": "Bomb Flings",
709 "map_wr_count": 0,
710 "placement": 1,
711 "scores": [
712 {
713 "record_id": 315,
714 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
715 "score_count": 31,
716 "score_time": 9999,
717 "date": "2023-09-03T19:09:11.602056Z"
718 }
719 ]
720 },
721 {
722 "game_id": 1,
723 "category_id": 6,
724 "map_id": 40,
725 "map_name": "Crazy Box",
726 "map_wr_count": 0,
727 "placement": 1,
728 "scores": [
729 {
730 "record_id": 316,
731 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
732 "score_count": 31,
733 "score_time": 9999,
734 "date": "2023-09-03T19:09:11.602056Z"
735 }
736 ]
737 },
738 {
739 "game_id": 1,
740 "category_id": 6,
741 "map_id": 41,
742 "map_name": "PotatOS",
743 "map_wr_count": 0,
744 "placement": 1,
745 "scores": [
746 {
747 "record_id": 317,
748 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
749 "score_count": 31,
750 "score_time": 9999,
751 "date": "2023-09-03T19:09:11.602056Z"
752 }
753 ]
754 },
755 {
756 "game_id": 1,
757 "category_id": 7,
758 "map_id": 42,
759 "map_name": "Propulsion Intro",
760 "map_wr_count": 0,
761 "placement": 2,
762 "scores": [
763 {
764 "record_id": 362,
765 "demo_id": "51453c2b-79a4-4fab-81bf-442cbbc997d6",
766 "score_count": 3,
767 "score_time": 856,
768 "date": "2023-11-06T15:45:52.867581Z"
769 },
770 {
771 "record_id": 318,
772 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
773 "score_count": 31,
774 "score_time": 9999,
775 "date": "2023-09-03T19:09:11.602056Z"
776 }
777 ]
778 },
779 {
780 "game_id": 1,
781 "category_id": 7,
782 "map_id": 43,
783 "map_name": "Propulsion Flings",
784 "map_wr_count": 0,
785 "placement": 1,
786 "scores": [
787 {
788 "record_id": 319,
789 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
790 "score_count": 31,
791 "score_time": 9999,
792 "date": "2023-09-03T19:09:11.602056Z"
793 }
794 ]
795 },
796 {
797 "game_id": 1,
798 "category_id": 7,
799 "map_id": 44,
800 "map_name": "Conversion Intro",
801 "map_wr_count": 0,
802 "placement": 1,
803 "scores": [
804 {
805 "record_id": 320,
806 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
807 "score_count": 31,
808 "score_time": 9999,
809 "date": "2023-09-03T19:09:11.602056Z"
810 }
811 ]
812 },
813 {
814 "game_id": 1,
815 "category_id": 7,
816 "map_id": 45,
817 "map_name": "Three Gels",
818 "map_wr_count": 0,
819 "placement": 1,
820 "scores": [
821 {
822 "record_id": 321,
823 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
824 "score_count": 31,
825 "score_time": 9999,
826 "date": "2023-09-03T19:09:11.602056Z"
827 }
828 ]
829 },
830 {
831 "game_id": 1,
832 "category_id": 8,
833 "map_id": 46,
834 "map_name": "Test",
835 "map_wr_count": 0,
836 "placement": 1,
837 "scores": [
838 {
839 "record_id": 322,
840 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
841 "score_count": 31,
842 "score_time": 9999,
843 "date": "2023-09-03T19:09:11.602056Z"
844 }
845 ]
846 },
847 {
848 "game_id": 1,
849 "category_id": 8,
850 "map_id": 47,
851 "map_name": "Funnel Intro",
852 "map_wr_count": 0,
853 "placement": 1,
854 "scores": [
855 {
856 "record_id": 323,
857 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
858 "score_count": 31,
859 "score_time": 9999,
860 "date": "2023-09-03T19:09:11.602056Z"
861 }
862 ]
863 },
864 {
865 "game_id": 1,
866 "category_id": 8,
867 "map_id": 48,
868 "map_name": "Ceiling Button",
869 "map_wr_count": 0,
870 "placement": 1,
871 "scores": [
872 {
873 "record_id": 324,
874 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
875 "score_count": 31,
876 "score_time": 9999,
877 "date": "2023-09-03T19:09:11.602056Z"
878 }
879 ]
880 },
881 {
882 "game_id": 1,
883 "category_id": 8,
884 "map_id": 49,
885 "map_name": "Wall Button",
886 "map_wr_count": 0,
887 "placement": 1,
888 "scores": [
889 {
890 "record_id": 325,
891 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
892 "score_count": 31,
893 "score_time": 9999,
894 "date": "2023-09-03T19:09:11.602056Z"
895 }
896 ]
897 },
898 {
899 "game_id": 1,
900 "category_id": 8,
901 "map_id": 50,
902 "map_name": "Polarity",
903 "map_wr_count": 0,
904 "placement": 1,
905 "scores": [
906 {
907 "record_id": 326,
908 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
909 "score_count": 31,
910 "score_time": 9999,
911 "date": "2023-09-03T19:09:11.602056Z"
912 }
913 ]
914 },
915 {
916 "game_id": 1,
917 "category_id": 8,
918 "map_id": 51,
919 "map_name": "Funnel Catch",
920 "map_wr_count": 0,
921 "placement": 1,
922 "scores": [
923 {
924 "record_id": 327,
925 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
926 "score_count": 31,
927 "score_time": 9999,
928 "date": "2023-09-03T19:09:11.602056Z"
929 }
930 ]
931 },
932 {
933 "game_id": 1,
934 "category_id": 8,
935 "map_id": 52,
936 "map_name": "Stop The Box",
937 "map_wr_count": 0,
938 "placement": 1,
939 "scores": [
940 {
941 "record_id": 328,
942 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
943 "score_count": 31,
944 "score_time": 9999,
945 "date": "2023-09-03T19:09:11.602056Z"
946 }
947 ]
948 },
949 {
950 "game_id": 1,
951 "category_id": 8,
952 "map_id": 53,
953 "map_name": "Laser Catapult",
954 "map_wr_count": 0,
955 "placement": 1,
956 "scores": [
957 {
958 "record_id": 329,
959 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
960 "score_count": 31,
961 "score_time": 9999,
962 "date": "2023-09-03T19:09:11.602056Z"
963 }
964 ]
965 },
966 {
967 "game_id": 1,
968 "category_id": 8,
969 "map_id": 54,
970 "map_name": "Laser Platform",
971 "map_wr_count": 0,
972 "placement": 1,
973 "scores": [
974 {
975 "record_id": 330,
976 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
977 "score_count": 31,
978 "score_time": 9999,
979 "date": "2023-09-03T19:09:11.602056Z"
980 }
981 ]
982 },
983 {
984 "game_id": 1,
985 "category_id": 8,
986 "map_id": 55,
987 "map_name": "Propulsion Catch",
988 "map_wr_count": 0,
989 "placement": 1,
990 "scores": [
991 {
992 "record_id": 331,
993 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
994 "score_count": 31,
995 "score_time": 9999,
996 "date": "2023-09-03T19:09:11.602056Z"
997 }
998 ]
999 },
1000 {
1001 "game_id": 1,
1002 "category_id": 8,
1003 "map_id": 56,
1004 "map_name": "Repulsion Polarity",
1005 "map_wr_count": 0,
1006 "placement": 1,
1007 "scores": [
1008 {
1009 "record_id": 332,
1010 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
1011 "score_count": 31,
1012 "score_time": 9999,
1013 "date": "2023-09-03T19:09:11.602056Z"
1014 }
1015 ]
1016 },
1017 {
1018 "game_id": 1,
1019 "category_id": 9,
1020 "map_id": 57,
1021 "map_name": "Finale 1",
1022 "map_wr_count": 0,
1023 "placement": 1,
1024 "scores": [
1025 {
1026 "record_id": 333,
1027 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
1028 "score_count": 31,
1029 "score_time": 9999,
1030 "date": "2023-09-03T19:09:11.602056Z"
1031 }
1032 ]
1033 },
1034 {
1035 "game_id": 1,
1036 "category_id": 9,
1037 "map_id": 58,
1038 "map_name": "Finale 2",
1039 "map_wr_count": 0,
1040 "placement": 1,
1041 "scores": [
1042 {
1043 "record_id": 334,
1044 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
1045 "score_count": 31,
1046 "score_time": 9999,
1047 "date": "2023-09-03T19:09:11.602056Z"
1048 }
1049 ]
1050 },
1051 {
1052 "game_id": 1,
1053 "category_id": 9,
1054 "map_id": 59,
1055 "map_name": "Finale 3",
1056 "map_wr_count": 2,
1057 "placement": 1,
1058 "scores": [
1059 {
1060 "record_id": 335,
1061 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
1062 "score_count": 31,
1063 "score_time": 9999,
1064 "date": "2023-09-03T19:09:11.602056Z"
1065 }
1066 ]
1067 },
1068 {
1069 "game_id": 1,
1070 "category_id": 9,
1071 "map_id": 60,
1072 "map_name": "Finale 4",
1073 "map_wr_count": 1,
1074 "placement": 1,
1075 "scores": [
1076 {
1077 "record_id": 336,
1078 "demo_id": "27b3a03e-56a3-4df3-b9bf-448fc0cbf1e7",
1079 "score_count": 31,
1080 "score_time": 9999,
1081 "date": "2023-09-03T19:09:11.602056Z"
1082 }
1083 ]
1084 },
1085 {
1086 "game_id": 2,
1087 "category_id": 11,
1088 "map_id": 63,
1089 "map_name": "Doors",
1090 "map_wr_count": 0,
1091 "placement": 1,
1092 "scores": [
1093 {
1094 "record_id": 5,
1095 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1096 "score_count": 31,
1097 "score_time": 9999,
1098 "date": "2023-09-03T19:12:05.958456Z"
1099 }
1100 ]
1101 },
1102 {
1103 "game_id": 2,
1104 "category_id": 11,
1105 "map_id": 64,
1106 "map_name": "Buttons",
1107 "map_wr_count": 2,
1108 "placement": 1,
1109 "scores": [
1110 {
1111 "record_id": 6,
1112 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1113 "score_count": 31,
1114 "score_time": 9999,
1115 "date": "2023-09-03T19:12:05.958456Z"
1116 }
1117 ]
1118 },
1119 {
1120 "game_id": 2,
1121 "category_id": 11,
1122 "map_id": 65,
1123 "map_name": "Lasers",
1124 "map_wr_count": 2,
1125 "placement": 1,
1126 "scores": [
1127 {
1128 "record_id": 7,
1129 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1130 "score_count": 31,
1131 "score_time": 9999,
1132 "date": "2023-09-03T19:12:05.958456Z"
1133 }
1134 ]
1135 },
1136 {
1137 "game_id": 2,
1138 "category_id": 11,
1139 "map_id": 66,
1140 "map_name": "Rat Maze",
1141 "map_wr_count": 0,
1142 "placement": 1,
1143 "scores": [
1144 {
1145 "record_id": 8,
1146 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1147 "score_count": 31,
1148 "score_time": 9999,
1149 "date": "2023-09-03T19:12:05.958456Z"
1150 }
1151 ]
1152 },
1153 {
1154 "game_id": 2,
1155 "category_id": 11,
1156 "map_id": 67,
1157 "map_name": "Laser Crusher",
1158 "map_wr_count": 0,
1159 "placement": 1,
1160 "scores": [
1161 {
1162 "record_id": 9,
1163 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1164 "score_count": 31,
1165 "score_time": 9999,
1166 "date": "2023-09-03T19:12:05.958456Z"
1167 }
1168 ]
1169 },
1170 {
1171 "game_id": 2,
1172 "category_id": 11,
1173 "map_id": 68,
1174 "map_name": "Behind The Scenes",
1175 "map_wr_count": 0,
1176 "placement": 1,
1177 "scores": [
1178 {
1179 "record_id": 10,
1180 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1181 "score_count": 31,
1182 "score_time": 9999,
1183 "date": "2023-09-03T19:12:05.958456Z"
1184 }
1185 ]
1186 },
1187 {
1188 "game_id": 2,
1189 "category_id": 12,
1190 "map_id": 69,
1191 "map_name": "Flings",
1192 "map_wr_count": 4,
1193 "placement": 1,
1194 "scores": [
1195 {
1196 "record_id": 11,
1197 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1198 "score_count": 31,
1199 "score_time": 9999,
1200 "date": "2023-09-03T19:12:05.958456Z"
1201 }
1202 ]
1203 },
1204 {
1205 "game_id": 2,
1206 "category_id": 12,
1207 "map_id": 70,
1208 "map_name": "Infinifling",
1209 "map_wr_count": 0,
1210 "placement": 1,
1211 "scores": [
1212 {
1213 "record_id": 12,
1214 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1215 "score_count": 31,
1216 "score_time": 9999,
1217 "date": "2023-09-03T19:12:05.958456Z"
1218 }
1219 ]
1220 },
1221 {
1222 "game_id": 2,
1223 "category_id": 12,
1224 "map_id": 71,
1225 "map_name": "Team Retrieval",
1226 "map_wr_count": 0,
1227 "placement": 1,
1228 "scores": [
1229 {
1230 "record_id": 13,
1231 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1232 "score_count": 31,
1233 "score_time": 9999,
1234 "date": "2023-09-03T19:12:05.958456Z"
1235 }
1236 ]
1237 },
1238 {
1239 "game_id": 2,
1240 "category_id": 12,
1241 "map_id": 72,
1242 "map_name": "Vertical Flings",
1243 "map_wr_count": 2,
1244 "placement": 1,
1245 "scores": [
1246 {
1247 "record_id": 14,
1248 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1249 "score_count": 31,
1250 "score_time": 9999,
1251 "date": "2023-09-03T19:12:05.958456Z"
1252 }
1253 ]
1254 },
1255 {
1256 "game_id": 2,
1257 "category_id": 12,
1258 "map_id": 73,
1259 "map_name": "Catapults",
1260 "map_wr_count": 4,
1261 "placement": 1,
1262 "scores": [
1263 {
1264 "record_id": 15,
1265 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1266 "score_count": 31,
1267 "score_time": 9999,
1268 "date": "2023-09-03T19:12:05.958456Z"
1269 }
1270 ]
1271 },
1272 {
1273 "game_id": 2,
1274 "category_id": 12,
1275 "map_id": 74,
1276 "map_name": "Multifling",
1277 "map_wr_count": 2,
1278 "placement": 1,
1279 "scores": [
1280 {
1281 "record_id": 16,
1282 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1283 "score_count": 31,
1284 "score_time": 9999,
1285 "date": "2023-09-03T19:12:05.958456Z"
1286 }
1287 ]
1288 },
1289 {
1290 "game_id": 2,
1291 "category_id": 12,
1292 "map_id": 75,
1293 "map_name": "Fling Crushers",
1294 "map_wr_count": 0,
1295 "placement": 1,
1296 "scores": [
1297 {
1298 "record_id": 17,
1299 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1300 "score_count": 31,
1301 "score_time": 9999,
1302 "date": "2023-09-03T19:12:05.958456Z"
1303 }
1304 ]
1305 },
1306 {
1307 "game_id": 2,
1308 "category_id": 12,
1309 "map_id": 76,
1310 "map_name": "Industrial Fan",
1311 "map_wr_count": 0,
1312 "placement": 1,
1313 "scores": [
1314 {
1315 "record_id": 18,
1316 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1317 "score_count": 31,
1318 "score_time": 9999,
1319 "date": "2023-09-03T19:12:05.958456Z"
1320 }
1321 ]
1322 },
1323 {
1324 "game_id": 2,
1325 "category_id": 13,
1326 "map_id": 77,
1327 "map_name": "Cooperative Bridges",
1328 "map_wr_count": 3,
1329 "placement": 1,
1330 "scores": [
1331 {
1332 "record_id": 19,
1333 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1334 "score_count": 31,
1335 "score_time": 9999,
1336 "date": "2023-09-03T19:12:05.958456Z"
1337 }
1338 ]
1339 },
1340 {
1341 "game_id": 2,
1342 "category_id": 13,
1343 "map_id": 78,
1344 "map_name": "Bridge Swap",
1345 "map_wr_count": 2,
1346 "placement": 1,
1347 "scores": [
1348 {
1349 "record_id": 20,
1350 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1351 "score_count": 31,
1352 "score_time": 9999,
1353 "date": "2023-09-03T19:12:05.958456Z"
1354 }
1355 ]
1356 },
1357 {
1358 "game_id": 2,
1359 "category_id": 13,
1360 "map_id": 79,
1361 "map_name": "Fling Block",
1362 "map_wr_count": 0,
1363 "placement": 1,
1364 "scores": [
1365 {
1366 "record_id": 4,
1367 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1368 "score_count": 0,
1369 "score_time": 43368,
1370 "date": "2023-08-30T13:16:56.91335Z"
1371 },
1372 {
1373 "record_id": 21,
1374 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1375 "score_count": 31,
1376 "score_time": 9999,
1377 "date": "2023-09-03T19:12:05.958456Z"
1378 }
1379 ]
1380 },
1381 {
1382 "game_id": 2,
1383 "category_id": 13,
1384 "map_id": 80,
1385 "map_name": "Catapult Block",
1386 "map_wr_count": 4,
1387 "placement": 2,
1388 "scores": [
1389 {
1390 "record_id": 22,
1391 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1392 "score_count": 31,
1393 "score_time": 9999,
1394 "date": "2023-09-03T19:12:05.958456Z"
1395 }
1396 ]
1397 },
1398 {
1399 "game_id": 2,
1400 "category_id": 13,
1401 "map_id": 81,
1402 "map_name": "Bridge Fling",
1403 "map_wr_count": 2,
1404 "placement": 1,
1405 "scores": [
1406 {
1407 "record_id": 23,
1408 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1409 "score_count": 31,
1410 "score_time": 9999,
1411 "date": "2023-09-03T19:12:05.958456Z"
1412 }
1413 ]
1414 },
1415 {
1416 "game_id": 2,
1417 "category_id": 13,
1418 "map_id": 82,
1419 "map_name": "Turret Walls",
1420 "map_wr_count": 4,
1421 "placement": 1,
1422 "scores": [
1423 {
1424 "record_id": 24,
1425 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1426 "score_count": 31,
1427 "score_time": 9999,
1428 "date": "2023-09-03T19:12:05.958456Z"
1429 }
1430 ]
1431 },
1432 {
1433 "game_id": 2,
1434 "category_id": 13,
1435 "map_id": 83,
1436 "map_name": "Turret Assasin",
1437 "map_wr_count": 0,
1438 "placement": 1,
1439 "scores": [
1440 {
1441 "record_id": 25,
1442 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1443 "score_count": 31,
1444 "score_time": 9999,
1445 "date": "2023-09-03T19:12:05.958456Z"
1446 }
1447 ]
1448 },
1449 {
1450 "game_id": 2,
1451 "category_id": 13,
1452 "map_id": 84,
1453 "map_name": "Bridge Testing",
1454 "map_wr_count": 0,
1455 "placement": 1,
1456 "scores": [
1457 {
1458 "record_id": 26,
1459 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1460 "score_count": 31,
1461 "score_time": 9999,
1462 "date": "2023-09-03T19:12:05.958456Z"
1463 }
1464 ]
1465 },
1466 {
1467 "game_id": 2,
1468 "category_id": 14,
1469 "map_id": 85,
1470 "map_name": "Cooperative Funnels",
1471 "map_wr_count": 0,
1472 "placement": 1,
1473 "scores": [
1474 {
1475 "record_id": 27,
1476 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1477 "score_count": 31,
1478 "score_time": 9999,
1479 "date": "2023-09-03T19:12:05.958456Z"
1480 }
1481 ]
1482 },
1483 {
1484 "game_id": 2,
1485 "category_id": 14,
1486 "map_id": 86,
1487 "map_name": "Funnel Drill",
1488 "map_wr_count": 0,
1489 "placement": 1,
1490 "scores": [
1491 {
1492 "record_id": 28,
1493 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1494 "score_count": 31,
1495 "score_time": 9999,
1496 "date": "2023-09-03T19:12:05.958456Z"
1497 }
1498 ]
1499 },
1500 {
1501 "game_id": 2,
1502 "category_id": 14,
1503 "map_id": 87,
1504 "map_name": "Funnel Catch",
1505 "map_wr_count": 0,
1506 "placement": 1,
1507 "scores": [
1508 {
1509 "record_id": 29,
1510 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1511 "score_count": 31,
1512 "score_time": 9999,
1513 "date": "2023-09-03T19:12:05.958456Z"
1514 }
1515 ]
1516 },
1517 {
1518 "game_id": 2,
1519 "category_id": 14,
1520 "map_id": 88,
1521 "map_name": "Funnel Laser",
1522 "map_wr_count": 0,
1523 "placement": 1,
1524 "scores": [
1525 {
1526 "record_id": 30,
1527 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1528 "score_count": 31,
1529 "score_time": 9999,
1530 "date": "2023-09-03T19:12:05.958456Z"
1531 }
1532 ]
1533 },
1534 {
1535 "game_id": 2,
1536 "category_id": 14,
1537 "map_id": 89,
1538 "map_name": "Cooperative Polarity",
1539 "map_wr_count": 0,
1540 "placement": 1,
1541 "scores": [
1542 {
1543 "record_id": 31,
1544 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1545 "score_count": 31,
1546 "score_time": 9999,
1547 "date": "2023-09-03T19:12:05.958456Z"
1548 }
1549 ]
1550 },
1551 {
1552 "game_id": 2,
1553 "category_id": 14,
1554 "map_id": 90,
1555 "map_name": "Funnel Hop",
1556 "map_wr_count": 0,
1557 "placement": 1,
1558 "scores": [
1559 {
1560 "record_id": 32,
1561 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1562 "score_count": 31,
1563 "score_time": 9999,
1564 "date": "2023-09-03T19:12:05.958456Z"
1565 }
1566 ]
1567 },
1568 {
1569 "game_id": 2,
1570 "category_id": 14,
1571 "map_id": 91,
1572 "map_name": "Advanced Polarity",
1573 "map_wr_count": 0,
1574 "placement": 1,
1575 "scores": [
1576 {
1577 "record_id": 33,
1578 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1579 "score_count": 31,
1580 "score_time": 9999,
1581 "date": "2023-09-03T19:12:05.958456Z"
1582 }
1583 ]
1584 },
1585 {
1586 "game_id": 2,
1587 "category_id": 14,
1588 "map_id": 92,
1589 "map_name": "Funnel Maze",
1590 "map_wr_count": 0,
1591 "placement": 1,
1592 "scores": [
1593 {
1594 "record_id": 34,
1595 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1596 "score_count": 31,
1597 "score_time": 9999,
1598 "date": "2023-09-03T19:12:05.958456Z"
1599 }
1600 ]
1601 },
1602 {
1603 "game_id": 2,
1604 "category_id": 14,
1605 "map_id": 93,
1606 "map_name": "Turret Warehouse",
1607 "map_wr_count": 0,
1608 "placement": 1,
1609 "scores": [
1610 {
1611 "record_id": 35,
1612 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1613 "score_count": 31,
1614 "score_time": 9999,
1615 "date": "2023-09-03T19:12:05.958456Z"
1616 }
1617 ]
1618 },
1619 {
1620 "game_id": 2,
1621 "category_id": 15,
1622 "map_id": 94,
1623 "map_name": "Repulsion Jumps",
1624 "map_wr_count": 0,
1625 "placement": 1,
1626 "scores": [
1627 {
1628 "record_id": 36,
1629 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1630 "score_count": 31,
1631 "score_time": 9999,
1632 "date": "2023-09-03T19:12:05.958456Z"
1633 }
1634 ]
1635 },
1636 {
1637 "game_id": 2,
1638 "category_id": 15,
1639 "map_id": 95,
1640 "map_name": "Double Bounce",
1641 "map_wr_count": 0,
1642 "placement": 1,
1643 "scores": [
1644 {
1645 "record_id": 37,
1646 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1647 "score_count": 31,
1648 "score_time": 9999,
1649 "date": "2023-09-03T19:12:05.958456Z"
1650 }
1651 ]
1652 },
1653 {
1654 "game_id": 2,
1655 "category_id": 15,
1656 "map_id": 96,
1657 "map_name": "Bridge Repulsion",
1658 "map_wr_count": 2,
1659 "placement": 1,
1660 "scores": [
1661 {
1662 "record_id": 38,
1663 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1664 "score_count": 31,
1665 "score_time": 9999,
1666 "date": "2023-09-03T19:12:05.958456Z"
1667 }
1668 ]
1669 },
1670 {
1671 "game_id": 2,
1672 "category_id": 15,
1673 "map_id": 97,
1674 "map_name": "Wall Repulsion",
1675 "map_wr_count": 2,
1676 "placement": 1,
1677 "scores": [
1678 {
1679 "record_id": 39,
1680 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1681 "score_count": 31,
1682 "score_time": 9999,
1683 "date": "2023-09-03T19:12:05.958456Z"
1684 }
1685 ]
1686 },
1687 {
1688 "game_id": 2,
1689 "category_id": 15,
1690 "map_id": 98,
1691 "map_name": "Propulsion Crushers",
1692 "map_wr_count": 0,
1693 "placement": 1,
1694 "scores": [
1695 {
1696 "record_id": 40,
1697 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1698 "score_count": 31,
1699 "score_time": 9999,
1700 "date": "2023-09-03T19:12:05.958456Z"
1701 }
1702 ]
1703 },
1704 {
1705 "game_id": 2,
1706 "category_id": 15,
1707 "map_id": 99,
1708 "map_name": "Turret Ninja",
1709 "map_wr_count": 0,
1710 "placement": 1,
1711 "scores": [
1712 {
1713 "record_id": 41,
1714 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1715 "score_count": 31,
1716 "score_time": 9999,
1717 "date": "2023-09-03T19:12:05.958456Z"
1718 }
1719 ]
1720 },
1721 {
1722 "game_id": 2,
1723 "category_id": 15,
1724 "map_id": 100,
1725 "map_name": "Propulsion Retrieval",
1726 "map_wr_count": 0,
1727 "placement": 1,
1728 "scores": [
1729 {
1730 "record_id": 42,
1731 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1732 "score_count": 31,
1733 "score_time": 9999,
1734 "date": "2023-09-03T19:12:05.958456Z"
1735 }
1736 ]
1737 },
1738 {
1739 "game_id": 2,
1740 "category_id": 15,
1741 "map_id": 101,
1742 "map_name": "Vault Entrance",
1743 "map_wr_count": 0,
1744 "placement": 1,
1745 "scores": [
1746 {
1747 "record_id": 43,
1748 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1749 "score_count": 31,
1750 "score_time": 9999,
1751 "date": "2023-09-03T19:12:05.958456Z"
1752 }
1753 ]
1754 },
1755 {
1756 "game_id": 2,
1757 "category_id": 16,
1758 "map_id": 102,
1759 "map_name": "Separation",
1760 "map_wr_count": 0,
1761 "placement": 1,
1762 "scores": [
1763 {
1764 "record_id": 44,
1765 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1766 "score_count": 31,
1767 "score_time": 9999,
1768 "date": "2023-09-03T19:12:05.958456Z"
1769 }
1770 ]
1771 },
1772 {
1773 "game_id": 2,
1774 "category_id": 16,
1775 "map_id": 103,
1776 "map_name": "Triple Axis",
1777 "map_wr_count": 0,
1778 "placement": 1,
1779 "scores": [
1780 {
1781 "record_id": 45,
1782 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1783 "score_count": 31,
1784 "score_time": 9999,
1785 "date": "2023-09-03T19:12:05.958456Z"
1786 }
1787 ]
1788 },
1789 {
1790 "game_id": 2,
1791 "category_id": 16,
1792 "map_id": 104,
1793 "map_name": "Catapult Catch",
1794 "map_wr_count": 0,
1795 "placement": 1,
1796 "scores": [
1797 {
1798 "record_id": 46,
1799 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1800 "score_count": 31,
1801 "score_time": 9999,
1802 "date": "2023-09-03T19:12:05.958456Z"
1803 }
1804 ]
1805 },
1806 {
1807 "game_id": 2,
1808 "category_id": 16,
1809 "map_id": 105,
1810 "map_name": "Bridge Gels",
1811 "map_wr_count": 2,
1812 "placement": 1,
1813 "scores": [
1814 {
1815 "record_id": 47,
1816 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1817 "score_count": 31,
1818 "score_time": 9999,
1819 "date": "2023-09-03T19:12:05.958456Z"
1820 }
1821 ]
1822 },
1823 {
1824 "game_id": 2,
1825 "category_id": 16,
1826 "map_id": 106,
1827 "map_name": "Maintenance",
1828 "map_wr_count": 0,
1829 "placement": 1,
1830 "scores": [
1831 {
1832 "record_id": 48,
1833 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1834 "score_count": 31,
1835 "score_time": 9999,
1836 "date": "2023-09-03T19:12:05.958456Z"
1837 }
1838 ]
1839 },
1840 {
1841 "game_id": 2,
1842 "category_id": 16,
1843 "map_id": 107,
1844 "map_name": "Bridge Catch",
1845 "map_wr_count": 0,
1846 "placement": 1,
1847 "scores": [
1848 {
1849 "record_id": 49,
1850 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1851 "score_count": 31,
1852 "score_time": 9999,
1853 "date": "2023-09-03T19:12:05.958456Z"
1854 }
1855 ]
1856 },
1857 {
1858 "game_id": 2,
1859 "category_id": 16,
1860 "map_id": 108,
1861 "map_name": "Double Lift",
1862 "map_wr_count": 0,
1863 "placement": 1,
1864 "scores": [
1865 {
1866 "record_id": 50,
1867 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1868 "score_count": 31,
1869 "score_time": 9999,
1870 "date": "2023-09-03T19:12:05.958456Z"
1871 }
1872 ]
1873 },
1874 {
1875 "game_id": 2,
1876 "category_id": 16,
1877 "map_id": 109,
1878 "map_name": "Gel Maze",
1879 "map_wr_count": 0,
1880 "placement": 1,
1881 "scores": [
1882 {
1883 "record_id": 51,
1884 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1885 "score_count": 31,
1886 "score_time": 9999,
1887 "date": "2023-09-03T19:12:05.958456Z"
1888 }
1889 ]
1890 },
1891 {
1892 "game_id": 2,
1893 "category_id": 16,
1894 "map_id": 110,
1895 "map_name": "Crazier Box",
1896 "map_wr_count": 0,
1897 "placement": 1,
1898 "scores": [
1899 {
1900 "record_id": 52,
1901 "demo_id": "b8d6adc2-d8b7-41e4-8faf-63f246d910cd",
1902 "score_count": 31,
1903 "score_time": 9999,
1904 "date": "2023-09-03T19:12:05.958456Z"
1905 }
1906 ]
1907 }
1908 ],
1909 "pagination": {
1910 "total_records": 0,
1911 "total_pages": 0,
1912 "current_page": 0,
1913 "page_size": 0
1914 }
1915
1916 }
1917
1918 )
1919 }}>
1920 <img src={UserIcon} alt="" /> 71 <img src={UserIcon} alt="" />
1921 <span> 72 <span>
1922 <img src={LoginIcon} alt="Sign in through Steam" /> 73 <img src={LoginIcon} alt="Sign in through Steam" />
diff --git a/frontend/src/components/ModMenu.tsx b/frontend/src/components/ModMenu.tsx
index a0945eb..5b0d1c8 100644
--- a/frontend/src/components/ModMenu.tsx
+++ b/frontend/src/components/ModMenu.tsx
@@ -5,14 +5,16 @@ import { MapSummary } from '../types/Map';
5import { ModMenuContent } from '../types/Content'; 5import { ModMenuContent } from '../types/Content';
6import { API } from '../api/Api'; 6import { API } from '../api/Api';
7import "../css/ModMenu.css" 7import "../css/ModMenu.css"
8import { useNavigate } from 'react-router-dom';
8 9
9interface ModMenuProps { 10interface ModMenuProps {
11 token?: string;
10 data: MapSummary; 12 data: MapSummary;
11 selectedRun: number; 13 selectedRun: number;
12 mapID: string; 14 mapID: string;
13} 15}
14 16
15const ModMenu: React.FC<ModMenuProps> = ({ data, selectedRun, mapID }) => { 17const ModMenu: React.FC<ModMenuProps> = ({ token, data, selectedRun, mapID }) => {
16 18
17 const [menu, setMenu] = React.useState<number>(0); 19 const [menu, setMenu] = React.useState<number>(0);
18 const [showButton, setShowButton] = React.useState<boolean>(true); 20 const [showButton, setShowButton] = React.useState<boolean>(true);
@@ -30,6 +32,8 @@ const ModMenu: React.FC<ModMenuProps> = ({ data, selectedRun, mapID }) => {
30 const [image, setImage] = React.useState<string>(""); 32 const [image, setImage] = React.useState<string>("");
31 const [md, setMd] = React.useState<string>(""); 33 const [md, setMd] = React.useState<string>("");
32 34
35 const navigate = useNavigate();
36
33 function compressImage(file: File): Promise<string> { 37 function compressImage(file: File): Promise<string> {
34 const reader = new FileReader(); 38 const reader = new FileReader();
35 reader.readAsDataURL(file); 39 reader.readAsDataURL(file);
@@ -61,26 +65,56 @@ const ModMenu: React.FC<ModMenuProps> = ({ data, selectedRun, mapID }) => {
61 65
62 const _edit_map_summary_image = async () => { 66 const _edit_map_summary_image = async () => {
63 if (window.confirm("Are you sure you want to submit this to the database?")) { 67 if (window.confirm("Are you sure you want to submit this to the database?")) {
64 await API.put_map_image(mapID, image); 68 if (token) {
69 const success = await API.put_map_image(token, mapID, image);
70 if (success) {
71 navigate(0);
72 } else {
73 alert("Error. Check logs.")
74 }
75 }
65 } 76 }
66 }; 77 };
67 78
68 const _edit_map_summary_route = async () => { 79 const _edit_map_summary_route = async () => {
69 if (window.confirm("Are you sure you want to submit this to the database?")) { 80 if (window.confirm("Are you sure you want to submit this to the database?")) {
70 await API.put_map_summary(mapID, routeContent); 81 if (token) {
82 routeContent.date += "T00:00:00Z";
83 const success = await API.put_map_summary(token, mapID, routeContent);
84 if (success) {
85 navigate(0);
86 } else {
87 alert("Error. Check logs.")
88 }
89 }
71 } 90 }
72 }; 91 };
73 92
74 const _create_map_summary_route = async () => { 93 const _create_map_summary_route = async () => {
75 if (window.confirm("Are you sure you want to submit this to the database?")) { 94 if (window.confirm("Are you sure you want to submit this to the database?")) {
76 await API.post_map_summary(mapID, routeContent); 95 if (token) {
96 routeContent.date += "T00:00:00Z";
97 const success = await API.post_map_summary(token, mapID, routeContent);
98 if (success) {
99 navigate(0);
100 } else {
101 alert("Error. Check logs.")
102 }
103 }
77 } 104 }
78 }; 105 };
79 106
80 const _delete_map_summary_route = async () => { 107 const _delete_map_summary_route = async () => {
81 if (window.confirm(`Are you sure you want to delete this run from the database? 108 if (window.confirm(`Are you sure you want to delete this run from the database?
82 ${data.summary.routes[selectedRun].category.name} ${data.summary.routes[selectedRun].history.score_count} portals ${data.summary.routes[selectedRun].history.runner_name}`)) { 109 ${data.summary.routes[selectedRun].category.name} ${data.summary.routes[selectedRun].history.score_count} portals ${data.summary.routes[selectedRun].history.runner_name}`)) {
83 await API.delete_map_summary(mapID, data.summary.routes[selectedRun].route_id); 110 if (token) {
111 const success = await API.delete_map_summary(token, mapID, data.summary.routes[selectedRun].route_id);
112 if (success) {
113 navigate(0);
114 } else {
115 alert("Error. Check logs.")
116 }
117 }
84 } 118 }
85 }; 119 };
86 120
diff --git a/frontend/src/components/RankingEntry.tsx b/frontend/src/components/RankingEntry.tsx
index 58a6aa6..25b0201 100644
--- a/frontend/src/components/RankingEntry.tsx
+++ b/frontend/src/components/RankingEntry.tsx
@@ -37,7 +37,7 @@ const RankingEntry: React.FC<RankingEntryProps> = (prop) => {
37 <span>{prop.curRankingData.user_name}</span> 37 <span>{prop.curRankingData.user_name}</span>
38 </Link> 38 </Link>
39 </div> 39 </div>
40 <span>{prop.curRankingData.overall_score}</span> 40 <span>{prop.currentLeaderboardType == RankingCategories.rankings_singleplayer ? prop.curRankingData.sp_score : prop.currentLeaderboardType == RankingCategories.rankings_multiplayer ? prop.curRankingData.mp_score : prop.curRankingData.overall_score}</span>
41 </div> 41 </div>
42 ) 42 )
43 } 43 }
diff --git a/frontend/src/components/Sidebar.tsx b/frontend/src/components/Sidebar.tsx
index 22d5c8b..c5c91db 100644
--- a/frontend/src/components/Sidebar.tsx
+++ b/frontend/src/components/Sidebar.tsx
@@ -153,7 +153,7 @@ const Sidebar: React.FC<SidebarProps> = ({ setToken, profile, setProfile, onUplo
153 <span></span> 153 <span></span>
154 154
155 { 155 {
156 profile ? 156 profile && profile.profile ?
157 <button id='upload-run' className='submit-run-button' onClick={() => onUploadRun()}><img src={UploadIcon} alt="upload" /><span>Submit&nbsp;a&nbsp;Run</span></button> 157 <button id='upload-run' className='submit-run-button' onClick={() => onUploadRun()}><img src={UploadIcon} alt="upload" /><span>Submit&nbsp;a&nbsp;Run</span></button>
158 : 158 :
159 <span></span> 159 <span></span>
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,
42 }; 42 };
43 43
44 React.useEffect(() => { 44 React.useEffect(() => {
45 _handle_game_select("1"); // a different approach? 45 if (open) {
46 }, []); 46 _handle_game_select("1"); // a different approach?.
47 }
48 }, [open]);
47 49
48 if (open) { 50 if (open) {
49 return ( 51 return (