diff --git a/src/components/MarketPlace/PopUp/MarketPopUp.jsx b/src/components/MarketPlace/PopUp/MarketPopUp.jsx index d04912a..7871915 100644 --- a/src/components/MarketPlace/PopUp/MarketPopUp.jsx +++ b/src/components/MarketPlace/PopUp/MarketPopUp.jsx @@ -1,11 +1,18 @@ -import { useCallback, useEffect, useMemo, useState } from "react"; -import ModalCom from "../../Helpers/ModalCom"; +import { useMemo, useState } from "react"; import { toast } from "react-toastify"; import usersService from "../../../services/UsersService"; -import LoadingSpinner from "../../Spinners/LoadingSpinner"; +import ModalCom from "../../Helpers/ModalCom"; import { PriceFormatter } from "../../Helpers/PriceFormatter"; +import LoadingSpinner from "../../Spinners/LoadingSpinner"; const MarketPopUp = ({ details, onClose, situation, marketInt }) => { + const [textValue, setTextValue] = useState(""); + const apiCall = useMemo(() => new usersService(), []); + + const handleInputChange = ({ target: { value } }) => { + setTextValue(value); + }; + const MarketCalls = (details) => { const [marketMsg, setMarketMsg] = useState({ loading: false, @@ -24,8 +31,8 @@ const MarketPopUp = ({ details, onClose, situation, marketInt }) => { const MarketDetail = async () => { try { - setMarketMsg({ loading: true }); if (!textValue) return; + setMarketMsg({ loading: true }); reqData.yourmessage = textValue; @@ -87,22 +94,11 @@ const MarketPopUp = ({ details, onClose, situation, marketInt }) => { } }; - // useEffect(() => { - // ManageInterest(); - // }, []); - return { MarketDetail, ManageInterest, manageInt, marketMsg }; }; - const [textValue, setTextValue] = useState(""); - - const handleInputChange = ({ target: { value } }) => { - setTextValue(value); - }; - - const apiCall = useMemo(() => new usersService(), []); - - let { manageInt, ManageInterest, MarketDetail, marketMsg } = MarketCalls(details); + let { manageInt, ManageInterest, MarketDetail, marketMsg } = + MarketCalls(details); let thePrice = PriceFormatter( details?.price * 0.01, @@ -270,9 +266,7 @@ const MarketPopUp = ({ details, onClose, situation, marketInt }) => { Interest: {details.interest_count}


-

- Expire: {details.expire} -

+

Expire: {details.expire}

- - } - - - - - {/* HIDES THIS SECTION IF CURENCY IS NAIRA */} - {currency != 'US Dollars' && -
-
-
-

Recent Activity

- {/*

Activity Report

*/} - {payment.loading ? - - : - - } -
-
-
- } + {/* HIDES THIS BUTTON IF CURENCY IS NAIRA */} + {currency != "US Dollars" && ( +
+ +
+ )} + - ) + + + {/* HIDES THIS SECTION IF CURENCY IS NAIRA */} + {currency != "US Dollars" && ( +
+
+
+

+ Recent Activity +

+ {/*

Activity Report

*/} + {payment.loading ? ( + + ) : ( + + )} +
+
+
+ )} + + ); } -export default AddFund \ No newline at end of file +export default AddFund; diff --git a/src/components/MyWallet/AddFundDollars.jsx b/src/components/MyWallet/AddFundDollars.jsx index 881f39d..6705d25 100644 --- a/src/components/MyWallet/AddFundDollars.jsx +++ b/src/components/MyWallet/AddFundDollars.jsx @@ -132,8 +132,6 @@ function AddFundDollars(props) { }); }, []); - console.log(props) - const handleClose = props.onClose return ( diff --git a/src/components/MyWallet/ConfirmAddFund.jsx b/src/components/MyWallet/ConfirmAddFund.jsx index 7047b66..452a6e5 100644 --- a/src/components/MyWallet/ConfirmAddFund.jsx +++ b/src/components/MyWallet/ConfirmAddFund.jsx @@ -2,7 +2,6 @@ import React, { useState } from "react"; import { useSelector } from "react-redux"; import { useNavigate } from "react-router-dom"; import { toast } from "react-toastify"; -import InputCom from "../Helpers/Inputs/InputCom"; import usersService from "../../services/UsersService"; @@ -113,14 +112,12 @@ function ConfirmAddFund({ confirmCredit, onClose, walletItem }) { ); + console.log(confirmCredit); + return (
- {/*

- Confirm Add Fund To Account -

-
*/}
{confirmCredit?.show ? ( @@ -136,13 +133,12 @@ function ConfirmAddFund({ confirmCredit, onClose, walletItem }) { }`}
-
- {/*

*/} +
{__confirmCard ? ( @@ -150,24 +146,20 @@ function ConfirmAddFund({ confirmCredit, onClose, walletItem }) { ) : null}
+
+

+ Reference No +

+ + {__confirmCard?.card_uid} + +

- ) : ( - - )} + ) : null}
- {/*

- {confirmCredit?.data?.currency && "Payment Method"} -

*/} {/*
*/} -
+
- + {confirmCredit?.data?.currency == "US Dollars" && ( + + )} {confirmCredit?.data?.currency == "Naira" && (
-
+
{wallet.loading ? (
- ) : wallet.data.length ? ( + ) : ( + wallet.data.length && wallet.data.map((item, index) => ( -
+
)) - ) : null} + )} {/*
*/} {/* */} diff --git a/src/components/MyWallet/WalletItemCard.jsx b/src/components/MyWallet/WalletItemCard.jsx index f3c43a1..9bdd588 100644 --- a/src/components/MyWallet/WalletItemCard.jsx +++ b/src/components/MyWallet/WalletItemCard.jsx @@ -1,10 +1,9 @@ import React, { useState } from "react"; -import background from "../../assets/images/bg-sky-blue.jpg"; //shape/balance-bg.svg"; -import { PriceFormatter } from "../Helpers/PriceFormatter"; -import { Link } from "react-router-dom"; import { useSelector } from "react-redux"; -import CreditPopup from "./Popup/CreditPopup"; +import background from "../../assets/images/bg-sky-blue.jpg"; //shape/balance-bg.svg"; import localImgLoad from "../../lib/localImgLoad"; +import { PriceFormatter } from "../Helpers/PriceFormatter"; +import CreditPopup from "./Popup/CreditPopup"; import WalletAction from "./WalletAction"; export default function WalletItemCard({ walletItem, payment }) { @@ -29,9 +28,9 @@ export default function WalletItemCard({ walletItem, payment }) { setCreditPopup({ show: false, data: {} }); }; - console.log("walletItem >>", walletItem, payment); - - let image = walletItem.code ? `${walletItem.code.toLocaleLowerCase()}.svg` : 'default.png' // HOLDS THE VALUE NAME PROPERTY FOR IMAGE ICON + let image = walletItem.code + ? `${walletItem.code.toLocaleLowerCase()}.svg` + : "default.png"; // HOLDS THE VALUE NAME PROPERTY FOR IMAGE ICON return ( <> @@ -43,7 +42,11 @@ export default function WalletItemCard({ walletItem, payment }) { >
- curreny-icon + curreny-icon

@@ -98,14 +101,15 @@ export default function WalletItemCard({ walletItem, payment }) {

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