Fix missing effect cleanup

This commit is contained in:
Dan Abramov
2023-11-24 03:21:42 +00:00
parent 7ccbd14d5f
commit e2a8a1d6bc
+2 -1
View File
@@ -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