family banner reload fixed
This commit was merged in pull request #860.
This commit is contained in:
+1
-1
@@ -94,7 +94,7 @@ export default function Routers() {
|
|||||||
<Route path="/complereset" element={<VerifyPasswordPagesTwo />} />
|
<Route path="/complereset" element={<VerifyPasswordPagesTwo />} />
|
||||||
<Route exact path="/outmessage" element={<VerifyYouPagesTwo />} />
|
<Route exact path="/outmessage" element={<VerifyYouPagesTwo />} />
|
||||||
<Route exact path="/eoffer" element={<LoginPageTwo />} />
|
<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 />} />
|
<Route exact path="/promo/:name/:id" element={<PromoPage />} />
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ function ReferralDisplay() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//FUNCTION TO SEND REFERRAL MESSAGE
|
//FUNCTION TO SEND REFERRAL MESSAGE
|
||||||
const sendReferralMsg = (postData) => {
|
const sendReferralMsg = (postData, helpers) => {
|
||||||
apiCall
|
apiCall
|
||||||
.sendReferralMsg(postData)
|
.sendReferralMsg(postData)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
@@ -90,6 +90,7 @@ function ReferralDisplay() {
|
|||||||
} else {
|
} else {
|
||||||
// toast.success(res.data.status | "Message Sent!");
|
// toast.success(res.data.status | "Message Sent!");
|
||||||
setError({ message: res.data.status, loading: false, status: true });
|
setError({ message: res.data.status, loading: false, status: true });
|
||||||
|
helpers.resetForm() // resets the form data
|
||||||
setRefHistoryReload((prev) => !prev);
|
setRefHistoryReload((prev) => !prev);
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
setError({ message: '', loading: false, status: true });
|
setError({ message: '', loading: false, status: true });
|
||||||
@@ -111,7 +112,7 @@ function ReferralDisplay() {
|
|||||||
//FUNCTION TO HANDLE SUBMIT
|
//FUNCTION TO HANDLE SUBMIT
|
||||||
const handleSubmit = (values, helpers) => {
|
const handleSubmit = (values, helpers) => {
|
||||||
setError({ message: "", loading: true, status: false });
|
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");
|
const [selectedTab, setSelectedTab] = useState("Send Referral");
|
||||||
|
|||||||
Reference in New Issue
Block a user