about summary refs log tree commit diff
path: root/src/view/com/modals/SwitchAccount.tsx
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2023-11-10 08:53:23 -0600
committerEric Bailey <git@esb.lol>2023-11-10 08:53:23 -0600
commit499021229a03b3414d6a1f2909c6e7d7db5e4b2f (patch)
treee60297e8bda7393df86dfb2058ed85d3e3d27106 /src/view/com/modals/SwitchAccount.tsx
parent60386f8f07cde330a0f36df614b04f07b89d72ab (diff)
downloadvoidsky-499021229a03b3414d6a1f2909c6e7d7db5e4b2f.tar.zst
Remove error states, just best effort
Diffstat (limited to 'src/view/com/modals/SwitchAccount.tsx')
-rw-r--r--src/view/com/modals/SwitchAccount.tsx9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/view/com/modals/SwitchAccount.tsx b/src/view/com/modals/SwitchAccount.tsx
index 55ba69365..05d0da37a 100644
--- a/src/view/com/modals/SwitchAccount.tsx
+++ b/src/view/com/modals/SwitchAccount.tsx
@@ -29,7 +29,7 @@ function SwitchAccountCard({account}: {account: SessionAccount}) {
   const {track} = useAnalytics()
   const {isSwitchingAccounts, currentAccount} = useSession()
   const {logout} = useSessionApi()
-  const {isError, data: profile} = useProfileQuery({did: account.did})
+  const {data: profile} = useProfileQuery({did: account.did})
   const isCurrentAccount = account.did === currentAccount?.did
   const {onPressSwitchAccount} = useAccountSwitcher()
 
@@ -38,9 +38,6 @@ function SwitchAccountCard({account}: {account: SessionAccount}) {
     logout()
   }, [track, logout])
 
-  // TODO
-  if (isError || !currentAccount) return null
-
   const contents = (
     <View style={[pal.view, styles.linkCard]}>
       <View style={styles.avi}>
@@ -48,10 +45,10 @@ function SwitchAccountCard({account}: {account: SessionAccount}) {
       </View>
       <View style={[s.flex1]}>
         <Text type="md-bold" style={pal.text} numberOfLines={1}>
-          {profile?.displayName || currentAccount.handle}
+          {profile?.displayName || currentAccount?.handle}
         </Text>
         <Text type="sm" style={pal.textLight} numberOfLines={1}>
-          {currentAccount.handle}
+          {currentAccount?.handle}
         </Text>
       </View>