cleanup
All checks were successful
Deploy Backend / docker (ubuntu-latest) (push) Successful in 46s
Deploy Website / docker (ubuntu-latest) (push) Successful in 2m10s

This commit is contained in:
Lee 2024-10-21 17:39:47 +01:00
parent de47905e28
commit d62b6524f7
4 changed files with 5 additions and 10 deletions

View File

@ -1 +1,4 @@
/**
* The status of the leaderboard.
*/
export type LeaderboardStatus = "Unranked" | "Ranked" | "Qualified";

View File

@ -11,8 +11,6 @@ import { fetchLeaderboard } from "@ssr/common/utils/leaderboard.util";
import LeaderboardScoresResponse from "@ssr/common/response/leaderboard-scores-response";
import LeaderboardPpChart from "@/components/leaderboard/leaderboard-pp-chart";
const REFRESH_INTERVAL = 1000 * 60 * 5;
type LeaderboardDataProps = {
/**
* The initial leaderboard data.
@ -39,8 +37,6 @@ export function LeaderboardData({ initialLeaderboard, initialScores, initialPage
queryFn: async (): Promise<LeaderboardResponse<ScoreSaberLeaderboard> | undefined> => {
return fetchLeaderboard<ScoreSaberLeaderboard>("scoresaber", currentLeaderboardId + "");
},
refetchInterval: REFRESH_INTERVAL,
refetchIntervalInBackground: false,
});
useEffect(() => {

View File

@ -8,8 +8,6 @@ import { useIsMobile } from "@/hooks/use-is-mobile";
import Pagination from "@/components/input/pagination";
import { PlayerRanking } from "@/components/ranking/player-ranking";
const REFRESH_INTERVAL = 1000 * 60 * 5;
type RankingDataProps = {
initialPage: number;
country?: string | undefined;
@ -31,8 +29,6 @@ export default function RankingData({ initialPage, country, initialPageData }: R
: await scoresaberService.lookupPlayersByCountry(currentPage, country);
return players && players.players.length > 0 ? players : undefined;
},
staleTime: REFRESH_INTERVAL,
refetchInterval: REFRESH_INTERVAL,
refetchIntervalInBackground: false,
});

View File

@ -26,8 +26,8 @@ export function ScoreModifiers({ score, type }: ScoreModifiersProps) {
return (
<span>
{Object.entries(Modifier)
.filter(mod => modifiers.includes(mod[1] as Modifier))
.map(mod => mod[0])
.filter(([_, mod]) => modifiers.includes(mod))
.map(([mod, _]) => mod)
.join(",")}
</span>
);