"use client"; import emailjs from "@emailjs/browser"; import React, { useRef } from "react"; import { toast } from "react-toastify"; import "react-toastify/dist/ReactToastify.css"; import AnimatedText from "../common/AnimatedText"; export default function ContactForm() { const form = useRef(); const sandMail = (e) => { e.preventDefault(); emailjs .sendForm("service_noj8796", "template_fs3xchn", form.current, { publicKey: "iG4SCmR-YtJagQ4gV", }) .then((res) => { if (res.status == 200) { toast.success("Message Sent successfully!", { position: "bottom-right", autoClose: 5000, hideProgressBar: false, closeOnClick: true, pauseOnHover: true, draggable: true, progress: undefined, }); form.current.reset(); } else { toast.error("Ops Message not Sent!", { position: "bottom-right", autoClose: 5000, hideProgressBar: false, closeOnClick: true, pauseOnHover: true, draggable: true, progress: undefined, }); } }); }; return (