fix profile loading error
This commit is contained in:
parent
999b7163df
commit
97c353a22a
|
@ -136,13 +136,11 @@ export const ConnectWalletButton: React.FC = () => {
|
|||
{!loadProfileDetails && !isMobile ? (
|
||||
<div className="ml-2 w-32 text-left">
|
||||
<p className="mb-0.5 truncate text-xs font-bold capitalize text-th-fgd-1">
|
||||
{profileDetails.profile_name}
|
||||
{profileDetails?.profile_name}
|
||||
</p>
|
||||
<p className="mb-0 text-xs text-th-fgd-4">
|
||||
{profileDetails.wallet_pk
|
||||
? abbreviateAddress(
|
||||
new PublicKey(profileDetails.wallet_pk)
|
||||
)
|
||||
{publicKey
|
||||
? abbreviateAddress(new PublicKey(publicKey))
|
||||
: ""}
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import useMangoStore from 'stores/useMangoStore'
|
||||
import { ProfileIcon } from './icons'
|
||||
import useMangoStore from "stores/useMangoStore"
|
||||
import { ProfileIcon } from "./icons"
|
||||
|
||||
const ProfileImage = ({
|
||||
imageSize,
|
||||
|
@ -14,7 +14,8 @@ const ProfileImage = ({
|
|||
}) => {
|
||||
const profile = useMangoStore((s) => s.profile.details)
|
||||
|
||||
return imageUrl || (isOwnerProfile && profile.profile_image_url) ? (
|
||||
return imageUrl ||
|
||||
(profile && isOwnerProfile && profile?.profile_image_url) ? (
|
||||
<img
|
||||
alt=""
|
||||
src={imageUrl ? imageUrl : profile.profile_image_url}
|
||||
|
|
Loading…
Reference in New Issue