Remove error states, just best effort
This commit is contained in:
parent
60386f8f07
commit
499021229a
4 changed files with 14 additions and 29 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue