diff --git a/components/ui/SpotifyPlayer.tsx b/components/ui/SpotifyPlayer.tsx index 63b69f5..aed0ac8 100644 --- a/components/ui/SpotifyPlayer.tsx +++ b/components/ui/SpotifyPlayer.tsx @@ -110,7 +110,8 @@ type PlayerStateResponse = { } function usePlayerState(path: string) { - const {data, error, isLoading} = useSWR(`/api/spotify/${path}`, fetcher) as PlayerStateResponse + const timestamp = Date.parse(new Date().toString()) + const {data, error, isLoading} = useSWR(`/api/spotify/${path}?ts=${timestamp}`, fetcher) as PlayerStateResponse return { song: data,