From b0fcc360e3b459c8f0fd211b554a38abe9c86d1c Mon Sep 17 00:00:00 2001 From: Lisa-Ann B Date: Mon, 13 Nov 2023 11:41:12 -0500 Subject: [PATCH] Move page saving logic after deleteCookies - #1029 --- src/context/AppContext.jsx | 9 +++++---- src/search-ui | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/context/AppContext.jsx b/src/context/AppContext.jsx index 28f2a0936..c3e888281 100644 --- a/src/context/AppContext.jsx +++ b/src/context/AppContext.jsx @@ -38,10 +38,6 @@ export const AppProvider = ({ cache, children }) => { useEffect(() => { // Should only include: '/', '/search', '/logout', '/login', '/404' const noRedirectTo = Object.values(APP_ROUTES) - if (noRedirectTo.indexOf(router.pathname) === -1) { - // Set expiry for 10 minutes - setLocalItemWithExpiry(pageKey, router.asPath, 600000) - } let info = getCookie('info') let groups_token = "" @@ -57,6 +53,11 @@ export const AppProvider = ({ cache, children }) => { deleteCookies() } + if (noRedirectTo.indexOf(router.pathname) === -1) { + // Set expiry for 10 minutes + setLocalItemWithExpiry(pageKey, router.asPath, 600000) + } + if(groups_token != "") { check_valid_token().then((response) => { if (typeof response == "boolean") { diff --git a/src/search-ui b/src/search-ui index c5af67841..13f5de101 160000 --- a/src/search-ui +++ b/src/search-ui @@ -1 +1 @@ -Subproject commit c5af67841ebfa8a8fc692d76e6f9eb810d311b30 +Subproject commit 13f5de101c68005be8a28ed742b68396b47afaee