Remove error states, just best effort

This commit is contained in:
Eric Bailey 2023-11-10 08:53:23 -06:00
parent 60386f8f07
commit 499021229a
4 changed files with 14 additions and 29 deletions

View file

@ -46,21 +46,15 @@ import {useSession} from '#/state/session'
const ProfileCard = observer(function ProfileCardImpl() {
const {currentAccount} = useSession()
const {
isLoading,
isError,
data: profile,
} = useProfileQuery({did: currentAccount!.did})
const {isLoading, data: profile} = useProfileQuery({did: currentAccount!.did})
const {isDesktop} = useWebMediaQueries()
const size = 48
if (isError || !profile || !currentAccount) return null
return !isLoading ? (
return !isLoading && profile ? (
<Link
href={makeProfileLink({
did: currentAccount.did,
handle: currentAccount.handle,
did: currentAccount!.did,
handle: currentAccount!.handle,
})}
style={[styles.profileCard, !isDesktop && styles.profileCardTablet]}
title="My Profile"