add score colors to the scores on a score leaderboard (the button to show the leaderboard for that score)
Some checks failed
Deploy / deploy (push) Has been cancelled

This commit is contained in:
Lee
2024-09-30 23:03:59 +01:00
parent 381e4bcb86
commit 7ca22a07e0
3 changed files with 49 additions and 22 deletions

View File

@ -6,17 +6,9 @@ import StatValue from "@/components/stat-value";
import { XMarkIcon } from "@heroicons/react/24/solid";
import clsx from "clsx";
import Tooltip from "@/components/tooltip";
import { ScoreBadge } from "@/components/score/score-badge";
type Badge = {
name: string;
color?: (score: ScoreSaberScoreToken, leaderboard: ScoreSaberLeaderboardToken) => string | undefined;
create: (
score: ScoreSaberScoreToken,
leaderboard: ScoreSaberLeaderboardToken
) => string | React.ReactNode | undefined;
};
const badges: Badge[] = [
const badges: ScoreBadge[] = [
{
name: "PP",
color: () => {