Fix messages in mail
This commit is contained in:
@@ -19,11 +19,11 @@ const schema = yup.object().shape({
|
||||
|
||||
|
||||
|
||||
function onSubmit(data) {
|
||||
const onSubmit = async (data) => {
|
||||
console.log("DATA=", data);
|
||||
try {
|
||||
|
||||
const response = axios.post(route("ajax.send.email"), {
|
||||
const response = await axios.post(route("ajax.send.email"), {
|
||||
name: data.name,
|
||||
email: data.email,
|
||||
subject: data.subject,
|
||||
@@ -33,15 +33,8 @@ function onSubmit(data) {
|
||||
console.log("TEST=", response.data);
|
||||
result.value = response.data;
|
||||
} catch (e) {
|
||||
const response = Swal.fire({
|
||||
title: __("are you want to try again") + "?",
|
||||
text: __(`${e}`),
|
||||
icon: "question",
|
||||
showCancelButton: true,
|
||||
showCloseButton: true,
|
||||
});
|
||||
|
||||
response.isConfirmed && fetch();
|
||||
console.log('TEST=',`${e}`);
|
||||
result.value = { 'error': `${e}`};
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user