mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-06 20:51:39 +00:00
Require only single query for search
This commit is contained in:
parent
e56350c1c2
commit
255a131f3b
5 changed files with 22 additions and 9 deletions
|
|
@ -15,6 +15,7 @@ export const useLyricSearch = (args: Omit<QueryHookArgs<LyricSearchQuery>, 'serv
|
|||
|
||||
return useQuery<Record<LyricSource, InternetProviderLyricSearchResponse[]>>({
|
||||
cacheTime: 1000 * 60 * 1,
|
||||
enabled: !!query.artist || !!query.name,
|
||||
queryFn: () => lyricsIpc?.searchRemoteLyrics(query),
|
||||
queryKey: queryKeys.songs.lyricsSearch(query),
|
||||
staleTime: 1000 * 60 * 1,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue