Disable the drawer and reset the nav when the user logs out or switches accounts

zio/stable
Paul Frazee 2023-03-16 11:41:59 -05:00
parent 64c8689a29
commit 93df983692
2 changed files with 3 additions and 1 deletions

View File

@ -68,6 +68,8 @@ export const SettingsScreen = withAuthRequired(
}
const onPressAddAccount = () => {
track('Settings:AddAccountButtonClicked')
navigation.navigate('HomeTab')
navigation.dispatch(StackActions.popToTop())
store.session.clear()
}
const onPressChangeHandle = () => {

View File

@ -46,7 +46,7 @@ const ShellInner = observer(() => {
onOpen={onOpenDrawer}
onClose={onCloseDrawer}
swipeEdgeWidth={winDim.width}
swipeEnabled={!canGoBack}>
swipeEnabled={!canGoBack && store.session.hasSession}>
<TabsNavigator />
</Drawer>
</ErrorBoundary>