1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Properly clean and reset navigators

This commit is contained in:
xmflsct
2023-01-03 00:10:44 +01:00
parent 4c6b8f0959
commit b067b9bdb1
8 changed files with 25 additions and 38 deletions

View File

@ -1,4 +1,4 @@
import { useNavigation } from '@react-navigation/native'
import { StackActions, useFocusEffect, useNavigation } from '@react-navigation/native'
import { useGlobalStorage } from '@utils/storage/actions'
import { useEffect } from 'react'
@ -8,8 +8,8 @@ const usePopToTop = () => {
const navigation = useNavigation()
const [accountActive] = useGlobalStorage.string('account.active')
return useEffect(() => {
// navigation.dispatch(StackActions.popToTop())
useEffect(() => {
navigation.dispatch(StackActions.popToTop())
}, [accountActive])
}