mirror of
https://github.com/r-freeman/portfolio.git
synced 2024-11-22 07:45:40 +00:00
Update SpotifyPlayer.tsx
This commit is contained in:
parent
69ab05c208
commit
460d9b21d1
@ -110,13 +110,7 @@ type PlayerStateResponse = {
|
||||
}
|
||||
|
||||
function usePlayerState(path: string) {
|
||||
const {data, error, isLoading} = useSWR(`/api/spotify/${path}`, fetcher, {
|
||||
refreshInterval: 3600,
|
||||
revalidateIfStale: true,
|
||||
revalidateOnMount: true,
|
||||
revalidateOnFocus: true,
|
||||
revalidateOnReconnect: true
|
||||
}) as PlayerStateResponse
|
||||
const {data, error, isLoading} = useSWR(`/api/spotify/${path}`, fetcher) as PlayerStateResponse
|
||||
|
||||
return {
|
||||
song: data,
|
||||
|
Loading…
Reference in New Issue
Block a user