From 154eec2aac656ac70d43b33fa767e244838d33dc Mon Sep 17 00:00:00 2001 From: Liam Date: Sun, 22 Oct 2023 05:34:08 +0100 Subject: [PATCH] add average pp stat --- src/components/player/PlayerInfo.tsx | 14 +++++++++++++- src/utils/scoresaber/scores.ts | 21 +++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/src/components/player/PlayerInfo.tsx b/src/components/player/PlayerInfo.tsx index b9b3067..79baa16 100644 --- a/src/components/player/PlayerInfo.tsx +++ b/src/components/player/PlayerInfo.tsx @@ -2,7 +2,11 @@ import { ScoresaberPlayer } from "@/schemas/scoresaber/player"; import { usePlayerScoresStore } from "@/store/playerScoresStore"; import { useSettingsStore } from "@/store/settingsStore"; import { formatNumber } from "@/utils/number"; -import { calcPpBoundary, getHighestPpPlay } from "@/utils/scoresaber/scores"; +import { + calcPpBoundary, + getAveragePp, + getHighestPpPlay, +} from "@/utils/scoresaber/scores"; import { GlobeAsiaAustraliaIcon, HomeIcon, @@ -179,6 +183,14 @@ export default function PlayerInfo({ playerData }: PlayerInfoProps) { getHighestPpPlay(playerId)?.toFixed(2), )}pp`} /> +