about summary refs log tree commit diff
path: root/src/lib/hooks/useAccountSwitcher.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/hooks/useAccountSwitcher.ts')
-rw-r--r--src/lib/hooks/useAccountSwitcher.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/hooks/useAccountSwitcher.ts b/src/lib/hooks/useAccountSwitcher.ts
index 2f2c110d9..74b5674d5 100644
--- a/src/lib/hooks/useAccountSwitcher.ts
+++ b/src/lib/hooks/useAccountSwitcher.ts
@@ -11,7 +11,7 @@ export function useAccountSwitcher() {
   const {track} = useAnalytics()
   const {selectAccount, clearCurrentAccount} = useSessionApi()
   const closeAllActiveElements = useCloseAllActiveElements()
-  const {setShowLoggedOut} = useLoggedOutViewControls()
+  const {requestSwitchToAccount} = useLoggedOutViewControls()
 
   const onPressSwitchAccount = useCallback(
     async (account: SessionAccount) => {
@@ -34,7 +34,7 @@ export function useAccountSwitcher() {
           }, 100)
         } else {
           closeAllActiveElements()
-          setShowLoggedOut(true)
+          requestSwitchToAccount({requestedAccount: account.did})
           Toast.show(
             `Please sign in as @${account.handle}`,
             'circle-exclamation',
@@ -50,7 +50,7 @@ export function useAccountSwitcher() {
       clearCurrentAccount,
       selectAccount,
       closeAllActiveElements,
-      setShowLoggedOut,
+      requestSwitchToAccount,
     ],
   )