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}