fix button alignment on score
Some checks failed
deploy / deploy (push) Failing after 36s

This commit is contained in:
Lee 2023-11-24 21:00:50 +00:00
parent 4c0775b000
commit b5629c0169

@ -30,9 +30,10 @@ export default function MapButtons({ leaderboard }: MapButtonsProps) {
return; return;
} }
const json = await beatSaberMap.json(); const json = await beatSaberMap.json();
if (json.maps[hash] !== null || json.maps[hash] !== undefined) { if (json.maps[hash] == null || json.maps[hash] == undefined) {
return; return;
} }
console.log(json);
setMapId(json.maps[hash].id); setMapId(json.maps[hash].id);
}, [hash]); }, [hash]);
@ -41,9 +42,10 @@ export default function MapButtons({ leaderboard }: MapButtonsProps) {
}, [getMapId]); }, [getMapId]);
return ( return (
<div className="hidden flex-col items-center justify-between gap-1 p-1 md:flex md:items-start md:justify-end"> <div className="hidden flex-col items-center gap-2 p-1 md:flex md:items-start">
{mapId && ( {mapId && (
<div className="flex gap-1"> <>
<div className="flex gap-2">
<Tooltip> <Tooltip>
<TooltipTrigger> <TooltipTrigger>
<Link <Link
@ -65,8 +67,7 @@ export default function MapButtons({ leaderboard }: MapButtonsProps) {
<CopyBsrButton mapId={mapId} /> <CopyBsrButton mapId={mapId} />
</div> </div>
)} <div className="flex gap-2">
<div className="flex gap-1">
<Tooltip> <Tooltip>
<TooltipTrigger> <TooltipTrigger>
<Link <Link
@ -90,6 +91,8 @@ export default function MapButtons({ leaderboard }: MapButtonsProps) {
</TooltipContent> </TooltipContent>
</Tooltip> </Tooltip>
</div> </div>
</>
)}
</div> </div>
); );
} }