about summary refs log tree commit diff
path: root/src/view/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/view/com')
-rw-r--r--src/view/com/auth/login/ChooseAccountForm.tsx9
-rw-r--r--src/view/com/modals/SwitchAccount.tsx9
2 files changed, 6 insertions, 12 deletions
diff --git a/src/view/com/auth/login/ChooseAccountForm.tsx b/src/view/com/auth/login/ChooseAccountForm.tsx
index add997896..c4a3b158c 100644
--- a/src/view/com/auth/login/ChooseAccountForm.tsx
+++ b/src/view/com/auth/login/ChooseAccountForm.tsx
@@ -22,15 +22,12 @@ function AccountItem({
 }) {
   const pal = usePalette('default')
   const {_} = useLingui()
-  const {isError, data} = useProfileQuery({did: account.did})
+  const {data: profile} = useProfileQuery({did: account.did})
 
   const onPress = React.useCallback(() => {
     onSelect(account)
   }, [account, onSelect])
 
-  // TODO
-  if (isError) return null
-
   return (
     <TouchableOpacity
       testID={`chooseAccountBtn-${account.handle}`}
@@ -42,11 +39,11 @@ function AccountItem({
       accessibilityHint="Double tap to sign in">
       <View style={[pal.borderDark, styles.groupContent, styles.noTopBorder]}>
         <View style={s.p10}>
-          <UserAvatar avatar={data?.avatar} size={30} />
+          <UserAvatar avatar={profile?.avatar} size={30} />
         </View>
         <Text style={styles.accountText}>
           <Text type="lg-bold" style={pal.text}>
-            {data?.displayName || account.handle}{' '}
+            {profile?.displayName || account.handle}{' '}
           </Text>
           <Text type="lg" style={[pal.textLight]}>
             {account.handle}
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>