cleanup and add weighted pp hover on score
Some checks failed
deploy / deploy (push) Failing after 1m34s
Some checks failed
deploy / deploy (push) Failing after 1m34s
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
import { ScoresaberLeaderboardInfo } from "@/schemas/scoresaber/leaderboard";
|
||||
import { ScoresaberScore } from "@/schemas/scoresaber/score";
|
||||
import { formatNumber } from "@/utils/number";
|
||||
import { scoresaberDifficultyNumberToName } from "@/utils/songUtils";
|
||||
import { formatNumber } from "@/utils/numberUtils";
|
||||
import { formatDate, formatTimeAgo } from "@/utils/timeUtils";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
@ -18,9 +17,6 @@ export default function LeaderboardScore({
|
||||
player,
|
||||
leaderboard,
|
||||
}: ScoreProps) {
|
||||
const diffName = scoresaberDifficultyNumberToName(
|
||||
leaderboard.difficulty.difficulty,
|
||||
);
|
||||
const accuracy = ((score.baseScore / leaderboard.maxScore) * 100).toFixed(2);
|
||||
|
||||
return (
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ScoresaberPlayer } from "@/schemas/scoresaber/player";
|
||||
import { formatNumber } from "@/utils/number";
|
||||
import { formatNumber } from "@/utils/numberUtils";
|
||||
import {
|
||||
CategoryScale,
|
||||
Chart as ChartJS,
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { ScoresaberPlayer } from "@/schemas/scoresaber/player";
|
||||
import { useScoresaberScoresStore } from "@/store/scoresaberScoresStore";
|
||||
import { useSettingsStore } from "@/store/settingsStore";
|
||||
import { formatNumber } from "@/utils/number";
|
||||
import { formatNumber } from "@/utils/numberUtils";
|
||||
import {
|
||||
calcPpBoundary,
|
||||
getAveragePp,
|
||||
|
@ -1,7 +1,8 @@
|
||||
import { ScoresaberLeaderboardInfo } from "@/schemas/scoresaber/leaderboard";
|
||||
import { ScoresaberPlayer } from "@/schemas/scoresaber/player";
|
||||
import { ScoresaberScore } from "@/schemas/scoresaber/score";
|
||||
import { formatNumber } from "@/utils/number";
|
||||
import { formatNumber } from "@/utils/numberUtils";
|
||||
import { getPpGainedFromScore } from "@/utils/scoresaber/scores";
|
||||
import {
|
||||
scoresaberDifficultyNumberToName,
|
||||
songDifficultyToColor,
|
||||
@ -120,6 +121,10 @@ export default function Score({ score, player, leaderboard }: ScoreProps) {
|
||||
<ScoreStatLabel
|
||||
className="bg-blue-500 text-center"
|
||||
value={formatNumber(score.pp.toFixed(2)) + "pp"}
|
||||
title={`Weighted pp ${formatNumber(
|
||||
getPpGainedFromScore(player.id, score),
|
||||
2,
|
||||
)}pp`}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
Reference in New Issue
Block a user