fix diff color
All checks were successful
Deploy SSR / deploy (push) Successful in 2m26s

This commit is contained in:
Lee 2024-09-14 12:18:12 +01:00
parent fc7cf73977
commit 87174eab5b
2 changed files with 15 additions and 11 deletions

@ -1,9 +1,9 @@
const diffColors: Record<string, string> = { const diffColors: Record<string, string> = {
easy: "MediumSeaGreen", easy: "#3CB371",
normal: "#59b0f4", normal: "#59b0f4",
hard: "tomato", hard: "#FF6347",
expert: "#bf2a42", expert: "#bf2a42",
expertPlus: "#8f48db", expertplus: "#8f48db",
}; };
const badgesDef: { const badgesDef: {

@ -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 { useCallback, useEffect, useState } from "react"; import { Suspense, 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";
@ -33,15 +33,19 @@ export default function Score({ playerScore }: Props) {
return ( return (
<div className="pb-2 pt-2"> <div className="pb-2 pt-2">
<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_1fr_300px]"> <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]`}
>
<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} />}