Fix perf issue on web - restore pop behaviour to tabs (#8620)
This commit is contained in:
@@ -11,7 +11,6 @@ import {
|
||||
type ViewStyle,
|
||||
} from 'react-native'
|
||||
import {sanitizeUrl} from '@braintree/sanitize-url'
|
||||
import {StackActions} from '@react-navigation/native'
|
||||
|
||||
import {
|
||||
type DebouncedNavigationProp,
|
||||
@@ -421,8 +420,10 @@ function onPressInner(
|
||||
if (tabState === TabState.InsideAtRoot) {
|
||||
emitSoftReset()
|
||||
} else {
|
||||
// note: 'navigate' actually acts the same as 'push' nowadays
|
||||
// therefore we need to add 'pop' -sfn
|
||||
// @ts-ignore we're not able to type check on this one -prf
|
||||
navigation.navigate(routeName, params)
|
||||
navigation.navigate(routeName, params, {pop: true})
|
||||
}
|
||||
} else {
|
||||
throw Error('Unsupported navigator action.')
|
||||
|
||||
Reference in New Issue
Block a user