diff --git a/pages/contacts.js b/pages/contacts.js index 42a7f8a..88230a2 100644 --- a/pages/contacts.js +++ b/pages/contacts.js @@ -1,8 +1,9 @@ -import { useMutation } from '@tanstack/react-query'; +import {useMutation} from '@tanstack/react-query'; import Layout from "../components/layout/Layout" import Link from "next/link" -import { Form, Formik } from 'formik'; +import {Form, Formik} from 'formik'; import * as Yup from "yup"; + export default function Home() { const validationSchema = Yup.object().shape({ @@ -24,25 +25,25 @@ export default function Home() { return null //completePWDReset(fields) }, onSuccess: (res) => { - if(res?.data?.resultCode != '0'){ + if (res?.data?.resultCode != '0') { throw({message: res?.data?.resultDescription}) } }, // onError: (err) => { // console.log('err', err) // } - }) - - const handleContactMutation = (values) => { - let reqData = { - ...values + }) + + const handleContactMutation = (values) => { + let reqData = { + ...values + } + console.log(reqData) + setTimeout(() => { + contactMutation.reset() + }, 3000) + // contactMutation.mutate(reqData) } - console.log(reqData) - setTimeout(()=>{ - contactMutation.reset() - },3000) - // contactMutation.mutate(reqData) - } return ( <> @@ -57,85 +58,137 @@ export default function Home() { {/* Title */}

Questions? Let's Talk

{/* Text */} -

Want to learn more about MERMS, get a quote, or speak with an expert? +

Want to learn more about MERMS, get a quote, or speak with + an expert? Let us know what you are looking for and we’ll get back to you right away

{/* CONTACT FORM */} -
-
-
- - {(props) => { - return ( -
- {/* Form Select */} -
-

This question is about:{(props.errors.subject && props.touched.subject) && {props.errors.subject}}

- Choose a topic, so we know who to send your request to: - -
- {/* Contact Form Input */} -
-

Your Name:{(props.errors.name && props.touched.name) && {props.errors.name}}

- Please enter your real name: - -
-
-

Your Email Address:{(props.errors.email && props.touched.email) && {props.errors.email}}

- Please carefully check your email address for accuracy - -
-
-

Explain your question in details:{(props.errors.message && props.touched.message) && {props.errors.message}}

- Your OS version, MERMS version & build, steps you did. Be VERY precise! -