diff --git a/src/view/shell/index.web.tsx b/src/view/shell/index.web.tsx index e833a08bfb..74477243d6 100644 --- a/src/view/shell/index.web.tsx +++ b/src/view/shell/index.web.tsx @@ -36,9 +36,10 @@ function ShellInner() { useAuxClick() useEffect(() => { - navigator.addListener('state', () => { + const unsubscribe = navigator.addListener('state', () => { closeAllActiveElements() }) + return unsubscribe }, [navigator, closeAllActiveElements]) const showBottomBar = isMobile && !onboardingState.isActive