add stale time to player data so it doesn't fetch it so often
All checks were successful
Deploy / deploy (push) Successful in 5m41s

This commit is contained in:
Lee 2024-09-30 11:29:52 +01:00
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)) {