diff --git a/src/components/music/NowPlaying.tsx b/src/components/music/NowPlaying.tsx index 05910cf..0294cdb 100644 --- a/src/components/music/NowPlaying.tsx +++ b/src/components/music/NowPlaying.tsx @@ -21,6 +21,8 @@ export default function NowPlaying() { const { data, error, isLoading } = useQuery({ queryKey: ['nowPlaying'], queryFn: () => fetcher('/api/v1/now-playing'), + staleTime: 1000 * 60 * 60, + refetchInterval: 1000 * 60 * 60, }); return ( diff --git a/src/components/music/TopArtists.tsx b/src/components/music/TopArtists.tsx index c96ed13..5c74a38 100644 --- a/src/components/music/TopArtists.tsx +++ b/src/components/music/TopArtists.tsx @@ -20,6 +20,8 @@ export default function TopArtists() { const { data, error, isLoading } = useQuery({ queryKey: ['topArtists'], queryFn: () => fetcher('/api/v1/top-artists'), + staleTime: 1000 * 60 * 60, + refetchInterval: 1000 * 60 * 60, }); let parsedData: Artist[] = []; diff --git a/src/components/music/TopTracks.tsx b/src/components/music/TopTracks.tsx index 16bd7cc..5487c26 100644 --- a/src/components/music/TopTracks.tsx +++ b/src/components/music/TopTracks.tsx @@ -21,6 +21,8 @@ export default function TopTracks() { const { data, error, isLoading } = useQuery({ queryKey: ['topTracks'], queryFn: () => fetcher('/api/v1/top-tracks'), + staleTime: 1000 * 60 * 60, + refetchInterval: 1000 * 60 * 60, }); let parsedData: Track[] = [];