diff --git a/src/apps/stable/features/search/api/useArtistsSearch.ts b/src/apps/stable/features/search/api/useArtistsSearch.ts index 6bcaaa2b9f..aa929d18e9 100644 --- a/src/apps/stable/features/search/api/useArtistsSearch.ts +++ b/src/apps/stable/features/search/api/useArtistsSearch.ts @@ -35,19 +35,15 @@ export const useArtistsSearch = ( return useQuery({ queryKey: ['ArtistsSearch', collectionType, parentId, searchTerm], - queryFn: async ({ signal }) => { - const artistsData = await fetchArtists( - api!, - userId!, - { - parentId: parentId, - searchTerm: searchTerm - }, - { signal } - ); - - return artistsData; - }, + queryFn: ({ signal }) => fetchArtists( + api!, + userId!, + { + parentId: parentId, + searchTerm: searchTerm + }, + { signal } + ), enabled: !!api && !!userId && (!collectionType || isMusic(collectionType)) }); }; diff --git a/src/apps/stable/features/search/api/usePeopleSearch.ts b/src/apps/stable/features/search/api/usePeopleSearch.ts index d485e9362c..92f1f0f3d4 100644 --- a/src/apps/stable/features/search/api/usePeopleSearch.ts +++ b/src/apps/stable/features/search/api/usePeopleSearch.ts @@ -37,18 +37,14 @@ export const usePeopleSearch = ( return useQuery({ queryKey: ['PeopleSearch', collectionType, parentId, searchTerm], - queryFn: async ({ signal }) => { - const peopleData = await fetchPeople( - api!, - userId!, - { - searchTerm: searchTerm - }, - { signal } - ); - - return peopleData; - }, + queryFn: ({ signal }) => fetchPeople( + api!, + userId!, + { + searchTerm: searchTerm + }, + { signal } + ), enabled: !!api && !!userId && isPeopleEnabled }); }; diff --git a/src/apps/stable/features/search/api/useVideoSearch.ts b/src/apps/stable/features/search/api/useVideoSearch.ts index a4b1a6be13..d5711b1987 100644 --- a/src/apps/stable/features/search/api/useVideoSearch.ts +++ b/src/apps/stable/features/search/api/useVideoSearch.ts @@ -43,19 +43,15 @@ export const useVideoSearch = ( return useQuery({ queryKey: ['VideoSearch', collectionType, parentId, searchTerm], - queryFn: async ({ signal }) => { - const videosData = await fetchPeople( - api!, - userId!, - { - parentId: parentId, - searchTerm: searchTerm - }, - { signal } - ); - - return videosData; - }, + queryFn: ({ signal }) => fetchPeople( + api!, + userId!, + { + parentId: parentId, + searchTerm: searchTerm + }, + { signal } + ), enabled: !!api && !!userId && !collectionType }); };