Skip to content

Commit

Permalink
Fix profile avatar issue
Browse files Browse the repository at this point in the history
  • Loading branch information
olehmell committed Aug 23, 2023
1 parent c2b7c98 commit 34c38e8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/AddressAvatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import useRandomColor from '@/hooks/useRandomColor'
import { getProfileQuery } from '@/services/mainnet-squid/query'
import { getAccountDataQuery } from '@/services/subsocial/evmAddresses'
import { cx } from '@/utils/class-names'
import { getIpfsContentUrl } from '@/utils/ipfs'
import * as bottts from '@dicebear/bottts'
import { createAvatar } from '@dicebear/core'
import Image from 'next/image'
Expand Down Expand Up @@ -65,6 +66,10 @@ const AddressAvatar = forwardRef<HTMLDivElement, AddressAvatarProps>(
}

let usedAvatar = profile?.profileSpace?.image
? getIpfsContentUrl(profile?.profileSpace?.image)
: undefined

console.log(usedAvatar, profile)
if (ensName) {
usedAvatar = resolveEnsAvatarSrc(ensName)
}
Expand Down

0 comments on commit 34c38e8

Please sign in to comment.