about summary refs log tree commit diff
path: root/src/view/shell/index.web.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/view/shell/index.web.tsx')
-rw-r--r--src/view/shell/index.web.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/view/shell/index.web.tsx b/src/view/shell/index.web.tsx
index e833a08bf..74477243d 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