diff options
author | Eric Bailey <git@esb.lol> | 2023-11-09 20:35:17 -0600 |
---|---|---|
committer | Eric Bailey <git@esb.lol> | 2023-11-09 20:35:17 -0600 |
commit | ab878ba9a6afaa57805aeab988b01c5b47bc9286 (patch) | |
tree | 266f68581a5d237b0d22b4b94fb92e0e45c0993b /src/view/shell/index.tsx | |
parent | 487d871cfd89948f4db9944c4bb414d268a56537 (diff) | |
download | voidsky-ab878ba9a6afaa57805aeab988b01c5b47bc9286.tar.zst |
Web login/signup and shell
Diffstat (limited to 'src/view/shell/index.tsx')
-rw-r--r-- | src/view/shell/index.tsx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/view/shell/index.tsx b/src/view/shell/index.tsx index 498bc11bd..75ed07475 100644 --- a/src/view/shell/index.tsx +++ b/src/view/shell/index.tsx @@ -33,6 +33,7 @@ import { } from '#/state/shell' import {isAndroid} from 'platform/detection' import {useModalControls} from '#/state/modals' +import {useSession} from '#/state/session' const ShellInner = observer(function ShellInnerImpl() { const store = useStores() @@ -57,6 +58,8 @@ const ShellInner = observer(function ShellInnerImpl() { [setIsDrawerOpen], ) const canGoBack = useNavigationState(state => !isStateAtTabRoot(state)) + const {hasSession} = useSession() + React.useEffect(() => { let listener = {remove() {}} if (isAndroid) { @@ -81,9 +84,7 @@ const ShellInner = observer(function ShellInnerImpl() { onOpen={onOpenDrawer} onClose={onCloseDrawer} swipeEdgeWidth={winDim.width / 2} - swipeEnabled={ - !canGoBack && store.session.hasSession && !isDrawerSwipeDisabled - }> + swipeEnabled={!canGoBack && hasSession && !isDrawerSwipeDisabled}> <TabsNavigator /> </Drawer> </ErrorBoundary> |