Skip to content

Commit 7400c99

Browse files
pan93412Copilot
andauthored
fix(statistics): Math.abs() for negative points
Co-authored-by: Copilot <[email protected]>
1 parent a45de58 commit 7400c99

File tree

1 file changed

+1
-1
lines changed
  • app/(app)/statistics/_components/ranking

1 file changed

+1
-1
lines changed

app/(app)/statistics/_components/ranking/score.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export function ScoreDiff({ score }: { score: number }) {
44
}
55

66
if (score < 0) {
7-
return <span className="text-red-800">-{score}</span>;
7+
return <span className="text-red-800">-{Math.abs(score)}</span>;
88
}
99

1010
return <span className="text-gray-800">無變化</span>;

0 commit comments

Comments
 (0)