diff --git a/src/pages/Contact/Contact.tsx b/src/pages/Contact/Contact.tsx index a43652f..93f87d1 100644 --- a/src/pages/Contact/Contact.tsx +++ b/src/pages/Contact/Contact.tsx @@ -21,88 +21,4 @@ function Contact() { e.preventDefault() await emailjs.send(import.meta.env.VITE_EMAILJS_SERVICE_ID!, import.meta.env.VITE_EMAILJS_TEMPLATE_ID!, formDetails, import.meta.env.VITE_EMAILJS_PUBLIC_KEY) .then(function (response) { - if (response) { - alert("Successfully sent the message.") - } - }, function (error) { - if (error) { - alert("Failed to send the message. Err: " + error) - } - }); - setFormDetails({ name: '', email: '', message: '', 'g-recaptcha-response': '' }) - setSendStatus(false) - } - - useEffect(() => { - window.scrollTo(0, 0); - }, []); - return ( - <> - -

- Still not answered, kindly contact us through the contact form below. -

-
-
-
- -

- Need to get in touch with us? Just fill out the form with your - inquiry! -

-
- - - - -
-
- - ); -} - -export default Contact; + .catch(err => console.error(err)) \ No newline at end of file