diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2024-10-30 00:57:58 +0300 |
|---|---|---|
| committer | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2024-10-30 00:57:58 +0300 |
| commit | 41b1dbdf6febc44b162f583eb614fad3ed8891d0 (patch) | |
| tree | 6aaddd34b14b677124cd806e59fdc0829d7c5d50 /frontend/src/api/Maps.tsx | |
| parent | frontend: HOW is h2 bigger than h1 i really hate our css (diff) | |
| download | lphub-41b1dbdf6febc44b162f583eb614fad3ed8891d0.tar.gz lphub-41b1dbdf6febc44b162f583eb614fad3ed8891d0.tar.bz2 lphub-41b1dbdf6febc44b162f583eb614fad3ed8891d0.zip | |
frontend: fix switching maps but not updating
Diffstat (limited to 'frontend/src/api/Maps.tsx')
| -rw-r--r-- | frontend/src/api/Maps.tsx | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/frontend/src/api/Maps.tsx b/frontend/src/api/Maps.tsx index 80f88d4..fc50293 100644 --- a/frontend/src/api/Maps.tsx +++ b/frontend/src/api/Maps.tsx | |||
| @@ -10,12 +10,10 @@ export const get_map_summary = async (map_id: string): Promise<MapSummary> => { | |||
| 10 | 10 | ||
| 11 | export const get_map_leaderboard = async (map_id: string): Promise<MapLeaderboard | undefined> => { | 11 | export const get_map_leaderboard = async (map_id: string): Promise<MapLeaderboard | undefined> => { |
| 12 | const response = await axios.get(url(`maps/${map_id}/leaderboards`)); | 12 | const response = await axios.get(url(`maps/${map_id}/leaderboards`)); |
| 13 | console.log(response) | ||
| 14 | if (!response.data.success) { | 13 | if (!response.data.success) { |
| 15 | return undefined; | 14 | return undefined; |
| 16 | } | 15 | } |
| 17 | const data = response.data.data; | 16 | const data = response.data.data; |
| 18 | console.log(data.records) | ||
| 19 | // map the kind of leaderboard | 17 | // map the kind of leaderboard |
| 20 | data.records = data.records.map((record: any) => { | 18 | data.records = data.records.map((record: any) => { |
| 21 | if (record.host && record.partner) { | 19 | if (record.host && record.partner) { |