From dd44322db790b8b2dabf2694fd5f4e0e635d5bd7 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Tue, 25 Jun 2024 17:54:30 +0800 Subject: [PATCH] set nav-return more often --- .../web/components/templates/library/LibraryContainer.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/web/components/templates/library/LibraryContainer.tsx b/packages/web/components/templates/library/LibraryContainer.tsx index b10024ad0..569c03937 100644 --- a/packages/web/components/templates/library/LibraryContainer.tsx +++ b/packages/web/components/templates/library/LibraryContainer.tsx @@ -162,6 +162,10 @@ export function LibraryContainer(props: LibraryContainerProps): JSX.Element { // eslint-disable-next-line react-hooks/exhaustive-deps }, [setQueryInputs, router.isReady, router.query]) + useEffect(() => { + window.localStorage.setItem('nav-return', router.asPath) + }, [router.asPath]) + const hasMore = useMemo(() => { if (!itemsPages) { return false