From ab878ba9a6afaa57805aeab988b01c5b47bc9286 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Thu, 9 Nov 2023 20:35:17 -0600 Subject: Web login/signup and shell --- src/view/shell/index.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/view/shell/index.tsx') 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}> -- cgit 1.4.1