/* contact.jsx — contact form (Name, Email, Message) + footer */ const { useState: useStateContact } = React; const FORM_ENDPOINT = 'https://formsubmit.co/ajax/muteebnasir9@gmail.com'; function ContactForm() { const { Button } = window.MacnitechDesignSystem_13fddf; const [data, setData] = useStateContact({ name: '', email: '', message: '' }); const [errors, setErrors] = useStateContact({}); const [sent, setSent] = useStateContact(false); const [sending, setSending] = useStateContact(false); const [serverError, setServerError] = useStateContact(''); const set = (k) => (e) => setData((d) => ({ ...d, [k]: e.target.value })); const submit = async (e) => { e.preventDefault(); const err = {}; if (!data.name.trim()) err.name = true; if (!/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(data.email)) err.email = true; if (!data.message.trim()) err.message = true; setErrors(err); if (Object.keys(err).length > 0) return; setSending(true); setServerError(''); try { const res = await fetch(FORM_ENDPOINT, { method: 'POST', headers: { 'Content-Type': 'application/json', 'Accept': 'application/json' }, body: JSON.stringify({ name: data.name, email: data.email, message: data.message }), }); const json = await res.json(); if (json.success === 'true' || json.success === true) { setSent(true); } else { setServerError('Something went wrong. Please try again or email us directly.'); } } catch { setServerError('Network error. Please try again or email us directly.'); } finally { setSending(false); } }; if (sent) { return (
We've got your message. Expect a reply within one business day — with a free growth audit attached.
Tell us what you're trying to grow. We'll send back a Digital Growth Audit showing exactly where the opportunities are.