From 529a81dd8aac7b2b9123054e3009935e6fac60bc Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Mon, 19 Aug 2024 16:06:10 +0800 Subject: [PATCH] Dont need previous fetching anymore --- .../templates/library/LibraryContainer.tsx | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/packages/web/components/templates/library/LibraryContainer.tsx b/packages/web/components/templates/library/LibraryContainer.tsx index 5c1d1a12a..2aaa5adf9 100644 --- a/packages/web/components/templates/library/LibraryContainer.tsx +++ b/packages/web/components/templates/library/LibraryContainer.tsx @@ -675,18 +675,11 @@ export function LibraryContainer(props: LibraryContainerProps): JSX.Element { activeCardId ? [...ACTIVE_ACTIONS, ...UNACTIVE_ACTIONS] : UNACTIVE_ACTIONS, [activeCardId, activeItem] ) - useFetchMore( - () => { - if (!isFetching && !isLoading && hasNextPage) { - fetchNextPage() - } - }, - () => { - if (!isFetching && !isLoading && hasPreviousPage) { - fetchPreviousPage() - } + useFetchMore(() => { + if (!isFetching && !isLoading && hasNextPage) { + fetchNextPage() } - ) + }) const setIsChecked = useCallback( (itemId: string, set: boolean) => {