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

View File

@ -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`}

View File

@ -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)