Skip to content

Commit

Permalink
added placeholder valur
Browse files Browse the repository at this point in the history
  • Loading branch information
NidhiKJha committed Jul 26, 2023
1 parent b773a72 commit 58d8eee
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ui/components/app/nft-details/nft-details.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export default function NftDetails({ nft }) {
const nftImageAlt = getNftImageAlt(nft);
const nftImageURL = getAssetImageURL(imageOriginal ?? image, ipfsGateway);
const isDataURI = nftImageURL.startsWith('data:');
const showNftDefaultImage = image === nftImageURL;

const formattedTimestamp = formatDate(
new Date(lastSale?.event_timestamp).getTime(),
Expand Down Expand Up @@ -193,6 +194,7 @@ export default function NftDetails({ nft }) {
tokenId={tokenId}
networkName={currentChain.nickname}
networkSrc={currentChain.rpcPrefs?.imageUrl}
showNftDefaultImage={showNftDefaultImage}
/>
</Box>
<Box
Expand Down
2 changes: 2 additions & 0 deletions ui/components/app/nfts-items/nfts-items.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ export default function NftsItems({
const { image, address, tokenId, name, imageOriginal } = nft;
const nftImage = getAssetImageURL(imageOriginal, ipfsGateway);
const nftImageAlt = getNftImageAlt(nft);
const showNftDefaultImage = image === nftImage;
const handleImageClick = () =>
history.push(`${ASSET_ROUTE}/${address}/${tokenId}`);
return (
Expand All @@ -190,6 +191,7 @@ export default function NftsItems({
networkSrc={currentChain.rpcPrefs?.imageUrl}
onClick={handleImageClick}
clickable
showNftDefaultImage={showNftDefaultImage}
/>
</Box>
);
Expand Down
4 changes: 3 additions & 1 deletion ui/components/multichain/nft-item/nft-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const NftItem = ({
networkSrc,
tokenId,
onClick,
showNftDefaultImage,
clickable = false,
}) => {
const testNetworkBackgroundColor = useSelector(getTestNetworkBackgroundColor);
Expand Down Expand Up @@ -58,7 +59,7 @@ export const NftItem = ({
/>
}
>
{src ? (
{showNftDefaultImage ? (
<Box
className="nft-item__item nft-item__item-image"
data-testid="nft-image"
Expand Down Expand Up @@ -91,4 +92,5 @@ NftItem.propTypes = {
tokenId: PropTypes.string.isRequired,
onClick: PropTypes.func,
clickable: PropTypes.bool,
showNftDefaultImage: PropTypes.bool,
};

0 comments on commit 58d8eee

Please sign in to comment.