bump nextjs
All checks were successful
Deploy Backend / docker (ubuntu-latest) (push) Successful in 1m7s
Deploy Website / docker (ubuntu-latest) (push) Successful in 2m8s

This commit is contained in:
Lee 2024-10-22 12:37:52 +01:00
parent f89207f306
commit 696da236d5
3 changed files with 4 additions and 5 deletions

BIN
bun.lockb

Binary file not shown.

View File

@ -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 => {

View File

@ -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",