This commit is contained in:
parent
2835f0713e
commit
f71f343c34
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user