/* This is the contact component. It will allow your user to send you an email. We use Sendgrid by default and you'll need to check /api/sendgrid.js and don't forget to add the environment variables. If you want to change the email provider, don't hesitate to create a new api route and change the axios.post here, line 18. */ import axios from "axios"; import { toast } from "react-toastify"; const Contact = () => { const sendEmail = () => { const name = document.getElementById("name").value; const email = document.getElementById("email").value; const message = document.getElementById("message").value; if (name && email && message) { axios .post("/api/sendgrid", { email, name, message }) .then((result) => { if (result.data.success === true) { toast.success(result.data.message); document.getElementById("name").value = ""; document.getElementById("email").value = ""; document.getElementById("message").value = ""; } }) .catch((err) => { console.log(err); }); } else { toast.info("Please enter at least one URL", { position: "top-center", autoClose: 2000, hideProgressBar: true, closeOnClick: true, pauseOnHover: true, draggable: true, progress: undefined, }); } }; return (

Contact

Do you have a question about SupaNexTail? A cool feature you'd like us to integrate? A bug to report? Don't hesitate!

); }; export default Contact;