code without createSwitchNavigator