Update SpotifyPlayer.tsx

This commit is contained in:
Ryan Freeman 2023-09-11 19:53:47 +01:00 committed by GitHub
parent 69ab05c208
commit 460d9b21d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,13 +110,7 @@ type PlayerStateResponse = {
} }
function usePlayerState(path: string) { function usePlayerState(path: string) {
const {data, error, isLoading} = useSWR(`/api/spotify/${path}`, fetcher, { const {data, error, isLoading} = useSWR(`/api/spotify/${path}`, fetcher) as PlayerStateResponse
refreshInterval: 3600,
revalidateIfStale: true,
revalidateOnMount: true,
revalidateOnFocus: true,
revalidateOnReconnect: true
}) as PlayerStateResponse
return { return {
song: data, song: data,