const accountId = props.accountId || context.accountId; const contractId = props.contractId; if (!contractId) { return `Missing prop "contractId"`; } if (!accountId) { return `Missing prop "accountId"`; } const nfts = Near.view(contractId, "nft_tokens_for_owner", { account_id: accountId, }); if (!nfts) { return ""; } return ( <> {nfts.map((nft) => ( <a className="text-decoration-none" href={`#mob.near/widget/NftImage?tokenId=${nft.token_id}&contractId=${contractId}`} > <Widget src="mob.near/widget/NftImage" props={{ nft: { tokenId: nft.token_id, contractId }, style: { width: "10em", height: "10em", objectFit: "cover" }, className: "img-thumbnail", fallbackUrl: "https://freesvg.org/img/ftfile-broken.png", alt: "nft", }} /> </a> ))} </> );