diff --git a/src/components/Referral/ReferralDisplay.jsx b/src/components/Referral/ReferralDisplay.jsx index ade2c64..7d87316 100644 --- a/src/components/Referral/ReferralDisplay.jsx +++ b/src/components/Referral/ReferralDisplay.jsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from "react"; -import { toast } from "react-toastify"; +// import { toast } from "react-toastify"; import usersService from "../../services/UsersService"; import InputCom from "../Helpers/Inputs/InputCom"; import LoadingSpinner from "../Spinners/LoadingSpinner"; @@ -84,11 +84,16 @@ function ReferralDisplay() { loading: false, status: false, }); - return; + setTimeout(()=>{ + setError({ message: '', loading: false, status: false }); + },3000) } else { - toast.success(res.data.status | "Message Sent!"); - setError({ message: "", loading: false, status: true }); + // toast.success(res.data.status | "Message Sent!"); + setError({ message: res.data.status, loading: false, status: true }); setRefHistoryReload((prev) => !prev); + setTimeout(()=>{ + setError({ message: '', loading: false, status: true }); + },3000) } }) .catch((error) => { @@ -97,6 +102,9 @@ function ReferralDisplay() { loading: false, status: false, }); + setTimeout(()=>{ + setError({ message: '', loading: false, status: false }); + },3000) }); }; @@ -228,7 +236,7 @@ function ReferralDisplay() {
{error.message}
+{error.message}
)}Uncompleted signup will be removed automatically after 7 days
+