Disable the drawer and reset the nav when the user logs out or switches accounts
parent
64c8689a29
commit
93df983692
|
@ -68,6 +68,8 @@ export const SettingsScreen = withAuthRequired(
|
||||||
}
|
}
|
||||||
const onPressAddAccount = () => {
|
const onPressAddAccount = () => {
|
||||||
track('Settings:AddAccountButtonClicked')
|
track('Settings:AddAccountButtonClicked')
|
||||||
|
navigation.navigate('HomeTab')
|
||||||
|
navigation.dispatch(StackActions.popToTop())
|
||||||
store.session.clear()
|
store.session.clear()
|
||||||
}
|
}
|
||||||
const onPressChangeHandle = () => {
|
const onPressChangeHandle = () => {
|
||||||
|
|
|
@ -46,7 +46,7 @@ const ShellInner = observer(() => {
|
||||||
onOpen={onOpenDrawer}
|
onOpen={onOpenDrawer}
|
||||||
onClose={onCloseDrawer}
|
onClose={onCloseDrawer}
|
||||||
swipeEdgeWidth={winDim.width}
|
swipeEdgeWidth={winDim.width}
|
||||||
swipeEnabled={!canGoBack}>
|
swipeEnabled={!canGoBack && store.session.hasSession}>
|
||||||
<TabsNavigator />
|
<TabsNavigator />
|
||||||
</Drawer>
|
</Drawer>
|
||||||
</ErrorBoundary>
|
</ErrorBoundary>
|
||||||
|
|
Loading…
Reference in New Issue