about summary refs log tree commit diff
path: root/src/lib
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2024-05-16 10:46:20 -0500
committerGitHub <noreply@github.com>2024-05-16 10:46:20 -0500
commit98af0e86786b8b3c6d4b36a5b6409fc5f6de14a5 (patch)
treede0997c76fc528caac59c762ccddb3bdb8d862ac /src/lib
parent400c269330e15921de3f01fb69f36e036ae92d51 (diff)
downloadvoidsky-98af0e86786b8b3c6d4b36a5b6409fc5f6de14a5.tar.zst
Handle failed resumeSession case when switching accounts (#4047)
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/hooks/useAccountSwitcher.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/hooks/useAccountSwitcher.ts b/src/lib/hooks/useAccountSwitcher.ts
index 33d56eb85..09ff30277 100644
--- a/src/lib/hooks/useAccountSwitcher.ts
+++ b/src/lib/hooks/useAccountSwitcher.ts
@@ -53,6 +53,11 @@ export function useAccountSwitcher() {
         logger.error(`switch account: selectAccount failed`, {
           message: e.message,
         })
+        requestSwitchToAccount({requestedAccount: account.did})
+        Toast.show(
+          _(msg`Please sign in as @${account.handle}`),
+          'circle-exclamation',
+        )
       } finally {
         setPendingDid(null)
       }