This commit is contained in:
parent
2835f0713e
commit
f71f343c34
@ -243,7 +243,7 @@ export default function PlayerInfo({ playerData }: PlayerInfoProps) {
|
||||
<Label
|
||||
title="Avg PP"
|
||||
className="bg-pp-blue"
|
||||
hoverValue="Average amount of pp per play (best 20 scores)"
|
||||
hoverValue="Average amount of pp per play (best 50 scores)"
|
||||
value={`${formatNumber(
|
||||
getAveragePp(playerId)?.toFixed(2),
|
||||
)}pp`}
|
||||
|
@ -192,9 +192,9 @@ export function getHighestPpPlay(playerId: string) {
|
||||
* Gets the average pp of the player
|
||||
*
|
||||
* @param playerId the player id
|
||||
* @param limit the amount of top scores to average (default: 20)
|
||||
* @param limit the amount of top scores to average (default: 50)
|
||||
*/
|
||||
export function getAveragePp(playerId: string, limit: number = 20) {
|
||||
export function getAveragePp(playerId: string, limit: number = 50) {
|
||||
const rankedScores = useScoresaberScoresStore
|
||||
.getState()
|
||||
.players.find((p) => p.id === playerId)
|
||||
|
Loading…
x
Reference in New Issue
Block a user