debug error handling in user panel and using new hooks of request instead axios

This commit is contained in:
2023-08-28 16:53:28 +03:30
parent 418e2a51e4
commit 13d1fbec59
7 changed files with 65 additions and 113 deletions

View File

@@ -88,13 +88,14 @@ const AddFormComponent = () => {
formData.append("national_card_image", values.national_card_image);
if (values.payan_khedmat_image != null)
formData.append("payan_khedmat_image", values.payan_khedmat_image);
requestServer(SEND_LOAN_REQUEST_WELFARE, "post", {auth: true, data: formData})
.then(function (response) {
}).catch(function (error) {
props.setSubmitting(false);
});
})
.catch(function (error) {
})
.finally(function () {
props.setSubmitting(false);
});
};
// end initial values, validation and request action of form