From b5629c0169a2afff95c177ffa2934877e1a0872d Mon Sep 17 00:00:00 2001 From: Liam Date: Fri, 24 Nov 2023 21:00:50 +0000 Subject: [PATCH] fix button alignment on score --- src/components/player/score/MapButtons.tsx | 95 +++++++++++----------- 1 file changed, 49 insertions(+), 46 deletions(-) diff --git a/src/components/player/score/MapButtons.tsx b/src/components/player/score/MapButtons.tsx index ee5dded..37ab5b0 100644 --- a/src/components/player/score/MapButtons.tsx +++ b/src/components/player/score/MapButtons.tsx @@ -30,9 +30,10 @@ export default function MapButtons({ leaderboard }: MapButtonsProps) { return; } const json = await beatSaberMap.json(); - if (json.maps[hash] !== null || json.maps[hash] !== undefined) { + if (json.maps[hash] == null || json.maps[hash] == undefined) { return; } + console.log(json); setMapId(json.maps[hash].id); }, [hash]); @@ -41,55 +42,57 @@ export default function MapButtons({ leaderboard }: MapButtonsProps) { }, [getMapId]); return ( -
+
{mapId && ( -
- - - - - - - -

Click to open the map page

-
-
+ + + + +

Click to open the map page

+
+ - -
+ +
+
+ + + + + + + +

Click to view the song on YouTube

+
+
+
+ )} -
- - - - - - - -

Click to view the song on YouTube

-
-
-
); }