about summary refs log tree commit diff
path: root/src/view/screens/Settings.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/screens/Settings.tsx
parent60386f8f07cde330a0f36df614b04f07b89d72ab (diff)
downloadvoidsky-499021229a03b3414d6a1f2909c6e7d7db5e4b2f.tar.zst
Remove error states, just best effort
Diffstat (limited to 'src/view/screens/Settings.tsx')
-rw-r--r--src/view/screens/Settings.tsx11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/view/screens/Settings.tsx b/src/view/screens/Settings.tsx
index cff92f8fd..e2cd4c9e7 100644
--- a/src/view/screens/Settings.tsx
+++ b/src/view/screens/Settings.tsx
@@ -72,21 +72,18 @@ function SettingsAccountCard({account}: {account: SessionAccount}) {
   const pal = usePalette('default')
   const {isSwitchingAccounts, currentAccount} = useSession()
   const {logout} = useSessionApi()
-  const {isError, data} = useProfileQuery({did: account.did})
+  const {data: profile} = useProfileQuery({did: account.did})
   const isCurrentAccount = account.did === currentAccount?.did
   const {onPressSwitchAccount} = useAccountSwitcher()
 
-  // TODO
-  if (isError || !currentAccount) return null
-
   const contents = (
     <View style={[pal.view, styles.linkCard]}>
       <View style={styles.avi}>
-        <UserAvatar size={40} avatar={data?.avatar} />
+        <UserAvatar size={40} avatar={profile?.avatar} />
       </View>
       <View style={[s.flex1]}>
         <Text type="md-bold" style={pal.text}>
-          {data?.displayName || account.handle}
+          {profile?.displayName || account.handle}
         </Text>
         <Text type="sm" style={pal.textLight}>
           {account.handle}
@@ -99,7 +96,7 @@ function SettingsAccountCard({account}: {account: SessionAccount}) {
           onPress={logout}
           accessibilityRole="button"
           accessibilityLabel="Sign out"
-          accessibilityHint={`Signs ${data?.displayName} out of Bluesky`}>
+          accessibilityHint={`Signs ${profile?.displayName} out of Bluesky`}>
           <Text type="lg" style={pal.link}>
             Sign out
           </Text>