potential fix for this?
All checks were successful
Deploy Backend / deploy (push) Successful in 2m55s
Deploy Website / deploy (push) Successful in 5m13s

This commit is contained in:
Lee
2024-10-12 05:26:30 +01:00
parent e67fcf328e
commit f26b997fbb
3 changed files with 46 additions and 23 deletions

View File

@ -40,7 +40,7 @@ const renderDailyChange = (change: number, tooltip: ReactElement, format?: (valu
* @param type the type of stat to get the change for
*/
const renderChange = (player: ScoreSaberPlayer, type: "rank" | "countryRank" | "pp", children: ReactElement) => {
const todayStats = player.statisticChange?.today;
const todayStats = player.statisticChange?.daily;
const weeklyStats = player.statisticChange?.weekly;
const monthlyStats = player.statisticChange?.monthly;
const todayStat = todayStats?.[type];
@ -94,7 +94,7 @@ const playerData = [
},
render: (player: ScoreSaberPlayer) => {
const statisticChange = player.statisticChange;
const rankChange = statisticChange?.today?.rank ?? 0;
const rankChange = statisticChange?.daily?.rank ?? 0;
return (
<div className="text-gray-300 flex gap-1 items-center">
@ -117,7 +117,7 @@ const playerData = [
},
render: (player: ScoreSaberPlayer) => {
const statisticChange = player.statisticChange;
const rankChange = statisticChange?.today?.countryRank ?? 0;
const rankChange = statisticChange?.daily?.countryRank ?? 0;
return (
<div className="text-gray-300 flex gap-1 items-center">
@ -139,7 +139,7 @@ const playerData = [
showWhenInactiveOrBanned: true,
render: (player: ScoreSaberPlayer) => {
const statisticChange = player.statisticChange;
const ppChange = statisticChange?.today?.pp ?? 0;
const ppChange = statisticChange?.daily?.pp ?? 0;
return (
<div className="text-gray-300 flex gap-1 items-center">