update avg pp to top 50
All checks were successful
deploy / deploy (push) Successful in 53s

This commit is contained in:
Lee 2023-10-28 00:31:23 +01:00
parent 2835f0713e
commit f71f343c34
2 changed files with 3 additions and 3 deletions

@ -243,7 +243,7 @@ export default function PlayerInfo({ playerData }: PlayerInfoProps) {
<Label <Label
title="Avg PP" title="Avg PP"
className="bg-pp-blue" 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( value={`${formatNumber(
getAveragePp(playerId)?.toFixed(2), getAveragePp(playerId)?.toFixed(2),
)}pp`} )}pp`}

@ -192,9 +192,9 @@ export function getHighestPpPlay(playerId: string) {
* Gets the average pp of the player * Gets the average pp of the player
* *
* @param playerId the player id * @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 const rankedScores = useScoresaberScoresStore
.getState() .getState()
.players.find((p) => p.id === playerId) .players.find((p) => p.id === playerId)