From 43c8fb6f03989208b3506c35bbdb35871198bb7a Mon Sep 17 00:00:00 2001
From: dan <dan.abramov@gmail.com>
Date: Fri, 24 Nov 2023 19:22:00 +0000
Subject: Fix missing effect cleanup (#1986)

---
 src/view/shell/index.web.tsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/view/shell/index.web.tsx')

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
-- 
cgit 1.4.1

