diff options
Diffstat (limited to 'src/state/session/index.tsx')
-rw-r--r-- | src/state/session/index.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/state/session/index.tsx b/src/state/session/index.tsx index 5c7cc1591..b88181ebd 100644 --- a/src/state/session/index.tsx +++ b/src/state/session/index.tsx @@ -15,8 +15,8 @@ import {logger} from '#/logger' import {isWeb} from '#/platform/detection' import * as persisted from '#/state/persisted' import {PUBLIC_BSKY_AGENT} from '#/state/queries' -import {useLoggedOutViewControls} from '#/state/shell/logged-out' import {useCloseAllActiveElements} from '#/state/util' +import {useGlobalDialogsControlContext} from '#/components/dialogs/Context' import {IS_DEV} from '#/env' import {emitSessionDropped} from '../events' import {readLabelers} from './agent-config' @@ -702,8 +702,8 @@ export function useSessionApi() { export function useRequireAuth() { const {hasSession} = useSession() - const {setShowLoggedOut} = useLoggedOutViewControls() const closeAll = useCloseAllActiveElements() + const {signinDialogControl} = useGlobalDialogsControlContext() return React.useCallback( (fn: () => void) => { @@ -711,10 +711,10 @@ export function useRequireAuth() { fn() } else { closeAll() - setShowLoggedOut(true) + signinDialogControl.open() } }, - [hasSession, setShowLoggedOut, closeAll], + [hasSession, signinDialogControl, closeAll], ) } |