mirror of
https://github.com/r-freeman/portfolio.git
synced 2024-11-22 16:45:41 +00:00
test cache workaround
This commit is contained in:
parent
67a709a511
commit
c40329806e
@ -110,7 +110,8 @@ type PlayerStateResponse = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function usePlayerState(path: string) {
|
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 {
|
return {
|
||||||
song: data,
|
song: data,
|
||||||
|
Loading…
Reference in New Issue
Block a user