Skip to content

Commit

Permalink
Fix avatars on nft carousel
Browse files Browse the repository at this point in the history
  • Loading branch information
WRadoslaw committed Nov 6, 2023
1 parent d7adf7c commit 9c9a474
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const NftCarouselDetails = ({
const { convertBlockToMsTimestamp } = useBlockTimeEstimation()
const nftStatus = getNftStatus(nft, nft?.video)

const creatorAvatarUrls =
const ownerAvatarUrls =
nft.owner.__typename === 'NftOwnerChannel'
? nft.owner.channel.avatarPhoto?.resolvedUrls
: getMemberAvatar(nft.owner.member).urls
Expand All @@ -60,17 +60,17 @@ export const NftCarouselDetails = ({
nft?.owner.__typename === 'NftOwnerChannel'
? {
name,
assetUrls: creatorAvatarUrls,
assetUrls: ownerAvatarUrls,
onClick: () => navigate(absoluteRoutes.viewer.channel(nft.video.channel.id)),
}
: nft?.owner.__typename === 'NftOwnerMember'
? {
name,
assetUrls: creatorAvatarUrls,
assetUrls: ownerAvatarUrls,
onClick: () => name && navigate(absoluteRoutes.viewer.member(name)),
}
: undefined,
[creatorAvatarUrls, name, navigate, nft]
[ownerAvatarUrls, name, navigate, nft]
)

const nftDetails = useMemo(
Expand All @@ -83,7 +83,7 @@ export const NftCarouselDetails = ({
: undefined,
creator: {
name: nft?.video.channel.title || undefined,
assetUrl: creatorAvatarUrls,
assetUrl: nft?.video.channel.avatarPhoto?.resolvedUrls,
onClick: () => navigate(absoluteRoutes.viewer.channel(nft?.video.channel.id)),
},
title: nft.video.title,
Expand All @@ -97,7 +97,7 @@ export const NftCarouselDetails = ({
? hapiBnToTokenNumber(nftStatus.startingPrice)
: undefined,
}),
[creatorAvatarUrls, navigate, nft, nftStatus]
[navigate, nft, nftStatus]
)

const avatars = useMemo(
Expand Down

0 comments on commit 9c9a474

Please sign in to comment.