Persist lyrics queries in indexeddb

This commit is contained in:
jeffvli 2023-08-04 01:41:45 -07:00
parent adfa748bfb
commit ee83fdba71
6 changed files with 138 additions and 32 deletions

View file

@ -86,7 +86,7 @@ export const useSongLyricsBySong = (
const server = getServerById(song?.serverId);
return useQuery({
cacheTime: 1000 * 60 * 10,
cacheTime: Infinity,
enabled: !!song && !!server,
onError: () => {},
queryFn: async ({ signal }) => {
@ -138,7 +138,7 @@ export const useSongLyricsBySong = (
return null;
},
queryKey: queryKeys.songs.lyrics(server?.id || '', query),
staleTime: 1000 * 60 * 2,
staleTime: Infinity,
});
};