Inform about Email sending...
This commit is contained in:
@@ -8,6 +8,7 @@ import * as yup from 'yup';
|
||||
import { defineProps } from "vue";
|
||||
import Swal from "sweetalert2";
|
||||
|
||||
const result = ref([]);
|
||||
const schema = yup.object().shape({
|
||||
name: yup.string().required('Name is required'),
|
||||
email: yup.string().email('Email is invalid').required('Email is required'),
|
||||
@@ -27,6 +28,7 @@ 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") + "?",
|
||||
@@ -120,6 +122,7 @@ function onSubmit(data) {
|
||||
<Field type='textarea' as='textarea' placeholder='Message' rows="6" name="message" class="w-full rounded-md px-4 border text-sm pt-2.5 outline-[#007bff]" />
|
||||
<div class="">{{ errors.message }}</div>
|
||||
<button type='submit' class="text-white bg-[#007bff] hover:bg-blue-600 font-semibold rounded-md text-sm px-4 py-2.5 w-full">Send</button>
|
||||
<div class="bg-green-500 w-full" v-if="result.success">{{ result.success }}</div>
|
||||
</Form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user