|
|
@ -49,7 +49,7 @@ export const Search: Component = () => {
|
|
|
|
data,
|
|
|
|
data,
|
|
|
|
error: fetchError,
|
|
|
|
error: fetchError,
|
|
|
|
fetchNextPage,
|
|
|
|
fetchNextPage,
|
|
|
|
hasNextPage,
|
|
|
|
// hasNextPage,
|
|
|
|
refetch,
|
|
|
|
refetch,
|
|
|
|
isFetching,
|
|
|
|
isFetching,
|
|
|
|
isFetchingNextPage
|
|
|
|
isFetchingNextPage
|
|
|
@ -63,7 +63,7 @@ export const Search: Component = () => {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
enabled: !!invalidQuery || !!invalidFilter,
|
|
|
|
enabled: !!invalidQuery || !!invalidFilter,
|
|
|
|
initialPageParam: "",
|
|
|
|
initialPageParam: "",
|
|
|
|
getNextPageParam: (lastPage, pages) => lastPage.nextCursor
|
|
|
|
getNextPageParam: (lastPage) => lastPage.nextCursor
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
const error = invalidQuery ?? invalidFilter ?? fetchError ?? undefined;
|
|
|
|
const error = invalidQuery ?? invalidFilter ?? fetchError ?? undefined;
|
|
|
@ -81,7 +81,7 @@ export const Search: Component = () => {
|
|
|
|
(visiblity: boolean) => {
|
|
|
|
(visiblity: boolean) => {
|
|
|
|
if (visiblity && !isFetchingNextPage) fetchNextPage();
|
|
|
|
if (visiblity && !isFetchingNextPage) fetchNextPage();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
[hasNextPage, isFetchingNextPage, fetchNextPage]
|
|
|
|
[isFetchingNextPage, fetchNextPage]
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|