diff --git a/src/components/player/PlayerInfo.tsx b/src/components/player/PlayerInfo.tsx index 88bc9c1..c492fee 100644 --- a/src/components/player/PlayerInfo.tsx +++ b/src/components/player/PlayerInfo.tsx @@ -6,6 +6,7 @@ import { calcPpBoundary, getAveragePp, getHighestPpPlay, + getTotalScores, } from "@/utils/scoresaber/scores"; import { GlobeAsiaAustraliaIcon, @@ -53,7 +54,7 @@ export default function PlayerInfo({ playerData }: PlayerInfoProps) { async function addProfile(isFriend: boolean) { if (!useScoresaberScoresStore.getState().exists(playerId)) { - const reponse = await playerScoreStore?.addPlayer( + const reponse = await playerScoreStore?.addOrUpdatePlayer( playerId, (page, totalPages) => { const autoClose = page == totalPages ? 5000 : false; @@ -192,6 +193,12 @@ export default function PlayerInfo({ playerData }: PlayerInfoProps) { {hasLocalScores && ( <> +