diff --git a/projects/website/src/components/player/player-scores.tsx b/projects/website/src/components/player/player-scores.tsx index 0dcf3f3..d3d8292 100644 --- a/projects/website/src/components/player/player-scores.tsx +++ b/projects/website/src/components/player/player-scores.tsx @@ -20,6 +20,8 @@ import ScoreSaberLeaderboard from "@ssr/common/leaderboard/impl/scoresaber-leade import { fetchPlayerScores } from "@ssr/common/utils/score-utils"; import PlayerScoresResponse from "@ssr/common/response/player-scores-response"; +const REFRESH_INTERVAL = 1000 * 60 * 5; + type Props = { initialScoreData?: PlayerScoresResponse; initialSearch?: string; @@ -71,7 +73,8 @@ export default function PlayerScores({ initialScoreData, initialSearch, player, pageState.sort, debouncedSearchTerm ), - staleTime: 30 * 1000, // 30 seconds + refetchInterval: REFRESH_INTERVAL, + refetchIntervalInBackground: false, enabled: shouldFetch && (debouncedSearchTerm.length >= 3 || debouncedSearchTerm.length === 0), });