Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
console.log('Skipping append dupe')
return
}
}
if (action.payload.fromKey) {
const {fromKey} = action.payload
const activeKey = getActiveKey(navigation.state)
if (fromKey !== activeKey) {
logger.warn('Skipping append on wrong screen')
return
}
}
if (action.payload.replace) {
return [StackActions.replace({params, routeName})]
}
return [StackActions.push({params, routeName})]
}
case RouteTreeGen.switchTab: {
return [NavigationActions.navigate({routeName: action.payload.tab})]
}
case RouteTreeGen.switchLoggedIn: {
return [NavigationActions.navigate({routeName: action.payload.loggedIn ? 'loggedIn' : 'loggedOut'})]
}
case RouteTreeGen.clearModals: {
const numModals = getNumModals(navigation)
return numModals ? [StackActions.pop({n: numModals})] : []
}
case RouteTreeGen.navigateUp:
return [NavigationActions.back({key: action.payload.fromKey})]