add stale time to player data so it doesn't fetch it so often
All checks were successful
Deploy / deploy (push) Successful in 5m41s
All checks were successful
Deploy / deploy (push) Successful in 5m41s
This commit is contained in:
parent
5f1ee985fb
commit
2abf754c13
@ -34,6 +34,7 @@ export default function PlayerData({
|
||||
const { data, isLoading, isError } = useQuery({
|
||||
queryKey: ["player", player.id],
|
||||
queryFn: () => scoresaberService.lookupPlayer(player.id),
|
||||
staleTime: 1000 * 60 * 5, // Cache data for 5 minutes
|
||||
});
|
||||
|
||||
if (data && (!isLoading || !isError)) {
|
||||
|
Reference in New Issue
Block a user