From 40bd67b72560d80536daa10b9668ce6c67a6a04e Mon Sep 17 00:00:00 2001 From: Ryan Freeman Date: Sat, 17 Aug 2024 23:21:51 +0100 Subject: [PATCH] revert cache workaround --- components/ui/SpotifyPlayer.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/ui/SpotifyPlayer.tsx b/components/ui/SpotifyPlayer.tsx index aed0ac8..63b69f5 100644 --- a/components/ui/SpotifyPlayer.tsx +++ b/components/ui/SpotifyPlayer.tsx @@ -110,8 +110,7 @@ type PlayerStateResponse = { } function usePlayerState(path: string) { - const timestamp = Date.parse(new Date().toString()) - const {data, error, isLoading} = useSWR(`/api/spotify/${path}?ts=${timestamp}`, fetcher) as PlayerStateResponse + const {data, error, isLoading} = useSWR(`/api/spotify/${path}`, fetcher) as PlayerStateResponse return { song: data,