From 24545baad5c64335dc36b3cafd6e592d216d0030 Mon Sep 17 00:00:00 2001 From: victorAnumudu Date: Thu, 13 Jul 2023 10:27:03 +0100 Subject: [PATCH] wallet clean up --- src/components/MyWallet/WalletAction.jsx | 49 +++++++++++++ src/components/MyWallet/WalletItemCard.jsx | 84 ++++++++++------------ tailwind.config.js | 3 + 3 files changed, 88 insertions(+), 48 deletions(-) create mode 100644 src/components/MyWallet/WalletAction.jsx diff --git a/src/components/MyWallet/WalletAction.jsx b/src/components/MyWallet/WalletAction.jsx new file mode 100644 index 0000000..3b25d3e --- /dev/null +++ b/src/components/MyWallet/WalletAction.jsx @@ -0,0 +1,49 @@ +import React from 'react' +import { Link } from 'react-router-dom'; + +function WalletAction({walletItem, payment, openPopUp}) { + return ( +
+
+ + Spend + +
+
+ +
+
+ ) +} + +export default WalletAction \ No newline at end of file diff --git a/src/components/MyWallet/WalletItemCard.jsx b/src/components/MyWallet/WalletItemCard.jsx index 039d638..f3c43a1 100644 --- a/src/components/MyWallet/WalletItemCard.jsx +++ b/src/components/MyWallet/WalletItemCard.jsx @@ -5,6 +5,7 @@ import { Link } from "react-router-dom"; import { useSelector } from "react-redux"; import CreditPopup from "./Popup/CreditPopup"; import localImgLoad from "../../lib/localImgLoad"; +import WalletAction from "./WalletAction"; export default function WalletItemCard({ walletItem, payment }) { // const [eth] = useState(90); @@ -40,13 +41,37 @@ export default function WalletItemCard({ walletItem, payment }) { background: `url(${background}) 0% 0% / cover no-repeat`, }} > -
-
+
+
curreny-icon
+
+

+ Current Balance +

+

+ {PriceFormatter( + walletItem.amount * 0.01, + walletItem.code, + undefined, + "text-[2rem]" + )} +

+

+ HOLDINGS :{" "} + + {PriceFormatter( + walletItem.escrow * 0.01, + walletItem.code, + undefined, + "text-[2rem]" + )} + +

+
-
-
+ {/*
+

Current Balance

@@ -70,54 +95,17 @@ export default function WalletItemCard({ walletItem, payment }) {

-
+
*/} {/* for white underline */}
- {!accountType && ( -
-
- - Spend - -
-
- -
-
- )} + {!accountType ? ( + + ) + : + null + }
{creditPopup.show && (