import { useState } from 'react'; export default function Contact() { const [formData, setFormData] = useState({ first_name: '', last_name: '', email: '', phone: '', message: '' }); const [loading, setLoading] = useState(false); const handleSubmit = async (e) => { e.preventDefault(); setLoading(true); try { const res = await fetch("/api/contact", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(formData) }); if (!res.ok) throw new Error("Failed to send"); alert("Message sent! Thank you for contacting us."); setFormData({ first_name: '', last_name: '', email: '', phone: '', message: '' }); } catch (err) { console.error(err); alert("Failed to send message"); } finally { setLoading(false); } }; const handleChange = (e) => { setFormData({ ...formData, [e.target.name]: e.target.value }); }; return ( <>
We'd love to hear from you. Reach out to our global teams.
Tell us a little about your business and we'll follow up within one business day.
2520 Indigo Dr
McKinney, TX
75072, United States
call +1 469-796-6151
508, White Square,
Hinjewadi Road, Pune
411057, India
call +91 738 793 6020