add no fail to acc
All checks were successful
Deploy Website / docker (ubuntu-latest) (push) Successful in 2m12s

This commit is contained in:
Lee 2024-10-19 12:33:26 +01:00
parent cec3541345
commit 79bdb801ff

@ -5,6 +5,7 @@ import { ScoreBadge, ScoreBadges } from "@/components/score/score-badge";
import ScoreSaberScore from "@ssr/common/score/impl/scoresaber-score"; import ScoreSaberScore from "@ssr/common/score/impl/scoresaber-score";
import ScoreSaberLeaderboard from "@ssr/common/leaderboard/impl/scoresaber-leaderboard"; import ScoreSaberLeaderboard from "@ssr/common/leaderboard/impl/scoresaber-leaderboard";
import FullComboBadge from "@/components/score/badges/full-combo"; import FullComboBadge from "@/components/score/badges/full-combo";
import { Modifier } from "@ssr/common/score/modifier";
const badges: ScoreBadge[] = [ const badges: ScoreBadge[] = [
{ {
@ -55,16 +56,20 @@ const badges: ScoreBadge[] = [
accDetails += ` (${scoreBadge.min}% - ${scoreBadge.max}%)`; accDetails += ` (${scoreBadge.min}% - ${scoreBadge.max}%)`;
} }
const failed = score.modifiers.includes("No Fail" as Modifier);
return ( return (
<> <>
<Tooltip <Tooltip
display={ display={
<div> <div>
<p>{accDetails}</p> <p>{accDetails}</p>
{failed && <p className="text-red-500">Failed</p>}
</div> </div>
} }
> >
<p className="cursor-default">{acc.toFixed(2)}%</p> <p className="cursor-default">
{acc.toFixed(2)}% {failed && <span>NF</span>}
</p>
</Tooltip> </Tooltip>
</> </>
); );