From 1c1c725045d05ff336e3483b6646a5297a1a8146 Mon Sep 17 00:00:00 2001 From: Jiku Godwill Date: Mon, 9 Sep 2024 17:40:33 +0100 Subject: [PATCH] currency icon fixes --- widget/components/NFT/Card.jsx | 10 +++++++++- widget/components/NFT/Details.jsx | 4 ++-- widget/page/cart.jsx | 24 +++++++++++++++++++++++- 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/widget/components/NFT/Card.jsx b/widget/components/NFT/Card.jsx index 9142385..b9aaf9f 100644 --- a/widget/components/NFT/Card.jsx +++ b/widget/components/NFT/Card.jsx @@ -141,7 +141,15 @@ const Card = ({ data }) => { cursor: "pointer", }} > - {existsInCart ? "Remove from cart" : `Add to cart ${priceInNear} `} + {existsInCart + ? "Remove from cart" + : `Add to cart ${ + data.price + ? data.currency === "near" + ? priceInNear + : (data?.price / 1000000).toFixed(2) + : "-" + }`} {!existsInCart && listingType[data?.currency]} diff --git a/widget/components/NFT/Details.jsx b/widget/components/NFT/Details.jsx index d3202ea..9d10602 100644 --- a/widget/components/NFT/Details.jsx +++ b/widget/components/NFT/Details.jsx @@ -13,8 +13,8 @@ const { href } = VM.require("buildhub.near/widget/lib.url") || { const nearIcon = ( + + +); + const cart = getCart(); const count = getCartItemCount(); const total = getCartTotal(); @@ -66,7 +86,9 @@ return ( {count ? (
-

Total: {total}N

+

+ Total: {total} {nearIcon} +

) : ( ""