fix
All checks were successful
Deploy SSR / deploy (push) Successful in 1m41s

This commit is contained in:
Lee 2024-09-14 14:48:56 +01:00
parent 87174eab5b
commit 21e39be003
3 changed files with 2488 additions and 1960 deletions

4198
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

@ -123,7 +123,7 @@ export default function PlayerRankChart({ player }: Props) {
return ( return (
<Card className="h-96"> <Card className="h-96">
<Line options={options} data={data} /> <Line className="w-fit" options={options} data={data} />
</Card> </Card>
); );
} }

@ -4,7 +4,7 @@ import { beatsaverService } from "@/common/service/impl/beatsaver";
import ScoreSaberPlayerScore from "@/common/service/types/scoresaber/scoresaber-player-score"; import ScoreSaberPlayerScore from "@/common/service/types/scoresaber/scoresaber-player-score";
import BeatSaverMap from "@/common/database/types/beatsaver-map"; import BeatSaverMap from "@/common/database/types/beatsaver-map";
import LeaderboardScores from "@/components/leaderboard/leaderboard-scores"; import LeaderboardScores from "@/components/leaderboard/leaderboard-scores";
import { Suspense, useCallback, useEffect, useState } from "react"; import { useCallback, useEffect, useState } from "react";
import ScoreButtons from "./score-buttons"; import ScoreButtons from "./score-buttons";
import ScoreSongInfo from "./score-info"; import ScoreSongInfo from "./score-info";
import ScoreRankInfo from "./score-rank-info"; import ScoreRankInfo from "./score-rank-info";
@ -34,18 +34,16 @@ export default function Score({ playerScore }: Props) {
return ( return (
<div className="pb-2 pt-2"> <div className="pb-2 pt-2">
<div <div
className={`grid w-full gap-2 lg:gap-0 first:pt-0 last:pb-0 grid-cols-[20px 1fr_1fr] lg:grid-cols-[0.85fr_4fr${beatSaverMap && "_1fr"}_300px]`} className={`grid w-full gap-2 lg:gap-0 first:pt-0 last:pb-0 grid-cols-[20px 1fr_1fr] lg:grid-cols-[0.85fr_4fr_1fr_300px]`}
> >
<ScoreRankInfo score={score} /> <ScoreRankInfo score={score} />
<ScoreSongInfo leaderboard={leaderboard} beatSaverMap={beatSaverMap} /> <ScoreSongInfo leaderboard={leaderboard} beatSaverMap={beatSaverMap} />
<Suspense>
<ScoreButtons <ScoreButtons
playerScore={playerScore} playerScore={playerScore}
beatSaverMap={beatSaverMap} beatSaverMap={beatSaverMap}
isLeaderboardExpanded={isLeaderboardExpanded} isLeaderboardExpanded={isLeaderboardExpanded}
setIsLeaderboardExpanded={setIsLeaderboardExpanded} setIsLeaderboardExpanded={setIsLeaderboardExpanded}
/> />
</Suspense>
<ScoreStats score={score} leaderboard={leaderboard} /> <ScoreStats score={score} leaderboard={leaderboard} />
</div> </div>
{isLeaderboardExpanded && <LeaderboardScores leaderboard={leaderboard} />} {isLeaderboardExpanded && <LeaderboardScores leaderboard={leaderboard} />}