Fix navigation (#8648)
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
type ViewStyle,
|
||||
} from 'react-native'
|
||||
import {sanitizeUrl} from '@braintree/sanitize-url'
|
||||
import {StackActions} from '@react-navigation/native'
|
||||
|
||||
import {
|
||||
type DebouncedNavigationProp,
|
||||
|
||||
@@ -350,7 +350,7 @@ function NavItem({count, hasNew, href, icon, iconFilled, label}: NavItemProps) {
|
||||
} else {
|
||||
const [screen, params] = router.matchPath(href)
|
||||
// @ts-expect-error TODO: type matchPath well enough that it can be plugged into navigation.navigate directly
|
||||
navigation.popTo(screen, params)
|
||||
navigation.navigate(screen, params, {pop: true})
|
||||
}
|
||||
},
|
||||
[navigation, href, isCurrent],
|
||||
|
||||
Reference in New Issue
Block a user