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