bump nextjs
This commit is contained in:
parent
f89207f306
commit
696da236d5
BIN
bun.lockb
BIN
bun.lockb
Binary file not shown.
@ -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 => {
|
||||
|
@ -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",
|
||||
|
Reference in New Issue
Block a user