From ac661d54ebe04612f045a2985ceccdef156ea361 Mon Sep 17 00:00:00 2001 From: Zixuan Chen Date: Sun, 5 May 2024 16:54:21 +0200 Subject: [PATCH] [fix] update cors headers --- components/home/SpotifyPlayerBox.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/home/SpotifyPlayerBox.tsx b/components/home/SpotifyPlayerBox.tsx index 1d75557..854790a 100644 --- a/components/home/SpotifyPlayerBox.tsx +++ b/components/home/SpotifyPlayerBox.tsx @@ -19,6 +19,10 @@ export default function SpotifyPlayerBox() { const fetcher = (url) => fetch(url).then((r) => r.json()) const { data }: { data: SongData } = useSWR('/api/spotify', fetcher) + const imageLoader = ({ src }) => { + return `/api/imageProxy?url=${encodeURIComponent(src)}` + } + return (