mirror of
https://github.com/r-freeman/portfolio.git
synced 2024-11-22 05:35:42 +00:00
test cache workaround
This commit is contained in:
parent
67a709a511
commit
c40329806e
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user