From 7e1983a4bc7dee7ad101bdb52da3960e48ca3432 Mon Sep 17 00:00:00 2001 From: Jiku Godwill Date: Fri, 6 Sep 2024 16:43:41 +0100 Subject: [PATCH] Showed NFT Images --- widget/components/NFT/Card.jsx | 34 ++++++++++++++++++++++--------- widget/components/NFT/Details.jsx | 8 ++++---- widget/page/home.jsx | 2 +- 3 files changed, 29 insertions(+), 15 deletions(-) diff --git a/widget/components/NFT/Card.jsx b/widget/components/NFT/Card.jsx index 2769a91..44a6fae 100644 --- a/widget/components/NFT/Card.jsx +++ b/widget/components/NFT/Card.jsx @@ -1,12 +1,25 @@ +const { href } = VM.require("buildhub.near/widget/lib.url") || { + href: () => {}, +}; const Card = ({ data }) => { + if (!data) { + return "Loading"; + } + const size = "100%"; return (
- { }, style: { width: size, - height: size, + height: "300px", objectFit: "cover", minWidth: size, minHeight: size, @@ -27,12 +40,11 @@ const Card = ({ data }) => { "https://ipfs.near.social/ipfs/bafkreihdiy3ec4epkkx7wc4wevssruen6b7f3oep5ylicnpnyyqzayvcry", }} /> - +
); }; + +return ; diff --git a/widget/components/NFT/Details.jsx b/widget/components/NFT/Details.jsx index 4b90e81..b888390 100644 --- a/widget/components/NFT/Details.jsx +++ b/widget/components/NFT/Details.jsx @@ -1,10 +1,10 @@ const { isDarkModeOn, data, NftCount, listingCount } = props; const { buyToken } = VM.require( - "${config_account}/widget/Mintbase.NFT.modules" + "${alias_GENADROP}/widget/Mintbase.NFT.modules" ); const { buyTokenAsADao } = VM.require( - "${config_account}/widget/Mintbase.utils.sdk" + "${alias_GENADROP}/widget/Mintbase.utils.sdk" ) || { buyTokenAsADao: () => {} }; const { href } = VM.require("buildhub.near/widget/lib.url") || { @@ -424,7 +424,7 @@ return !data ? ( Contract Owner { ) : ( -
The store has no listed NFTs yet.
+
There's nothing to show yet.
)} );