fix funny spam

This commit is contained in:
Lee 2023-03-21 16:49:28 +00:00
parent e1d942fb1b
commit bd05c17a85
No known key found for this signature in database
GPG Key ID: BAF8F4DB8E7F38EF

@ -186,25 +186,23 @@ export const useSongDataStore = create<SongDataState>()((set) => ({
setPp: (percent: number) => { setPp: (percent: number) => {
const leaderboardData = useSongDataStore.getState().mapLeaderboardData; const leaderboardData = useSongDataStore.getState().mapLeaderboardData;
if ( // if (
leaderboardData.beatleader.stars == undefined || // leaderboardData.beatleader.stars == undefined ||
leaderboardData.scoresaber.stars == undefined // leaderboardData.scoresaber.stars == undefined
) { // ) {
setTimeout(() => { // setTimeout(() => {
useSongDataStore.getState().setPp(percent); // useSongDataStore.getState().setPp(percent);
}, 100); // }, 100);
} // }
const scoreSaberMapStarCount = const scoreSaberMapStarCount = leaderboardData.scoresaber.stars;
useSongDataStore.getState().mapLeaderboardData.scoresaber.stars;
let scoreSaberPP = Utils.calculatePP( let scoreSaberPP = Utils.calculatePP(
scoreSaberMapStarCount, scoreSaberMapStarCount,
percent, percent,
"ScoreSaber" "ScoreSaber"
); );
const beatLeaderMapStarCount = const beatLeaderMapStarCount = leaderboardData.beatleader.stars;
useSongDataStore.getState().mapLeaderboardData.beatleader.stars;
let beatLeaderPP = Utils.calculatePP( let beatLeaderPP = Utils.calculatePP(
beatLeaderMapStarCount, beatLeaderMapStarCount,
percent, percent,