"use client"; import React from "react"; import submitContactForm from "../../functions/frontend/submitContactForm"; export default function ContactForm() { let [success, setSuccess] = React.useState(null); let [loading, setLoading] = React.useState(false); return (
{ submitContactForm(e, setSuccess, setLoading); }} > {loading &&
Sending Mail...
} {success === "Success" && (
Success!!!{" "}
)} {success === "Failed" && (
Failed{" "}
)}
); }