From ab3b24a07266badec469b14db387c12920d75f95 Mon Sep 17 00:00:00 2001 From: keyan Date: Mon, 12 Jun 2023 15:49:48 -0500 Subject: [PATCH] refine pwa back button --- components/header.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/header.js b/components/header.js index cce539da..64a7297d 100644 --- a/components/header.js +++ b/components/header.js @@ -29,8 +29,9 @@ function WalletSummary ({ me }) { function Back () { const router = useRouter() - if (typeof window !== 'undefined' && (typeof window.navigation === 'undefined' || window.navigation.canGoBack === undefined || window?.navigation.canGoBack)) { - return router.back()} /> + if (typeof window !== 'undefined' && router.asPath !== '/' && + (typeof window.navigation === 'undefined' || window.navigation.canGoBack === undefined || window?.navigation.canGoBack)) { + return router.back()}> } return null }