From ec9d793d6b9feb4044b66558171d63b01259e4b7 Mon Sep 17 00:00:00 2001
From: Ebube
Date: Thu, 13 Jul 2023 18:07:05 +0100
Subject: [PATCH] .
---
.../MarketPlace/PopUp/MarketPopUp.jsx | 34 ++-
src/components/MyWallet/AddFund.jsx | 208 ++++++++++--------
src/components/MyWallet/AddFundDollars.jsx | 2 -
src/components/MyWallet/ConfirmAddFund.jsx | 45 ++--
src/components/MyWallet/WalletBox.jsx | 13 +-
src/components/MyWallet/WalletItemCard.jsx | 32 +--
6 files changed, 170 insertions(+), 164 deletions(-)
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}