diff --git a/bun.lockb b/bun.lockb index 3d135ce..744826b 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/projects/common/src/player/impl/scoresaber-player.ts b/projects/common/src/player/impl/scoresaber-player.ts index 9fb0416..dd2ced8 100644 --- a/projects/common/src/player/impl/scoresaber-player.ts +++ b/projects/common/src/player/impl/scoresaber-player.ts @@ -181,15 +181,14 @@ export async function getScoreSaberPlayerFromToken( * Gets the change in the given stat * * @param statType the stat to check - * @param positive whether to multiply the change by 1 or -1 + * @param isNegativeChange whether to multiply the change by 1 or -1 * @param daysAgo the amount of days ago to get the stat for * @return the change */ - const getStatisticChange = (statType: string, positive: boolean, daysAgo: number = 1): number | undefined => { + const getStatisticChange = (statType: string, isNegativeChange: boolean, daysAgo: number = 1): number | undefined => { const todayStats = statisticHistory[todayDate]; let otherDate: Date | undefined; - // Use the same logic as the first version to get the date exactly 'daysAgo' days earlier if (daysAgo === 1) { otherDate = getMidnightAlignedDate(getDaysAgoDate(1)); // Yesterday } else { @@ -240,7 +239,7 @@ export async function getScoreSaberPlayerFromToken( if (statToday === undefined || statOther === undefined) { return undefined; } - return (statToday - statOther) * (!positive ? 1 : -1); + return (statToday - statOther) * (!isNegativeChange ? 1 : -1); }; const getStatisticChanges = (daysAgo: number): PlayerHistory => { diff --git a/projects/website/package.json b/projects/website/package.json index 1cc532a..08991db 100644 --- a/projects/website/package.json +++ b/projects/website/package.json @@ -35,7 +35,7 @@ "js-cookie": "^3.0.5", "ky": "^1.7.2", "lucide-react": "^0.451.0", - "next": "15.0.0-rc.1", + "next": "^15.0.0", "next-build-id": "^3.0.0", "next-themes": "^0.3.0", "react": "18.3.1",