diff --git a/components/header.js b/components/header.js index 64a7297d..3e0dd8af 100644 --- a/components/header.js +++ b/components/header.js @@ -29,9 +29,15 @@ function WalletSummary ({ me }) { function Back () { const router = useRouter() - if (typeof window !== 'undefined' && router.asPath !== '/' && - (typeof window.navigation === 'undefined' || window.navigation.canGoBack === undefined || window?.navigation.canGoBack)) { - return router.back()}> + const [show, setShow] = useState() + + useEffect(() => { + setShow(typeof window !== 'undefined' && router.asPath !== '/' && + (typeof window.navigation === 'undefined' || window.navigation.canGoBack === undefined || window?.navigation.canGoBack)) + }, [router.asPath]) + + if (show) { + return router.back()}> } return null }