test cache workaround

This commit is contained in:
Ryan Freeman 2024-08-17 23:15:10 +01:00
parent 67a709a511
commit c40329806e

View File

@ -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,