about summary refs log tree commit diff
path: root/src/view/shell/index.web.tsx
diff options
context:
space:
mode:
authordan <dan.abramov@gmail.com>2023-11-24 19:22:00 +0000
committerGitHub <noreply@github.com>2023-11-24 19:22:00 +0000
commit43c8fb6f03989208b3506c35bbdb35871198bb7a (patch)
tree25f5a54d1e93829eeb3b9c5799ccef6acd443238 /src/view/shell/index.web.tsx
parent7ccbd14d5f159363ffc3c087281a6a89f770f6b8 (diff)
downloadvoidsky-43c8fb6f03989208b3506c35bbdb35871198bb7a.tar.zst
Fix missing effect cleanup (#1986)
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