family banner reload fixed

This commit was merged in pull request #860.
This commit is contained in:
victorAnumudu
2024-11-29 11:37:46 +01:00
parent 6be6d5cecd
commit d78c30d9b5
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -94,7 +94,7 @@ export default function Routers() {
<Route path="/complereset" element={<VerifyPasswordPagesTwo />} />
<Route exact path="/outmessage" element={<VerifyYouPagesTwo />} />
<Route exact path="/eoffer" element={<LoginPageTwo />} />
<Route exact path="/invite" element={<LoginPageTwo />} />
<Route exact path="/invite" element={<SignupPageTwo />} />
<Route exact path="/promo/:name/:id" element={<PromoPage />} />
</>
) : (
+3 -2
View File
@@ -74,7 +74,7 @@ function ReferralDisplay() {
};
//FUNCTION TO SEND REFERRAL MESSAGE
const sendReferralMsg = (postData) => {
const sendReferralMsg = (postData, helpers) => {
apiCall
.sendReferralMsg(postData)
.then((res) => {
@@ -90,6 +90,7 @@ function ReferralDisplay() {
} else {
// toast.success(res.data.status | "Message Sent!");
setError({ message: res.data.status, loading: false, status: true });
helpers.resetForm() // resets the form data
setRefHistoryReload((prev) => !prev);
setTimeout(()=>{
setError({ message: '', loading: false, status: true });
@@ -111,7 +112,7 @@ function ReferralDisplay() {
//FUNCTION TO HANDLE SUBMIT
const handleSubmit = (values, helpers) => {
setError({ message: "", loading: true, status: false });
sendReferralMsg({...values}); // FUNCTION TO SEND REFERRAL MESSAGE
sendReferralMsg({...values}, helpers); // FUNCTION TO SEND REFERRAL MESSAGE
};
const [selectedTab, setSelectedTab] = useState("Send Referral");