// ============================================================ // Contact page + inquiry form - FreshWave Digital Studio // ============================================================ function InquiryForm() { const [form, setForm] = useState({ name: '', email: '', project: '', type: '', budget: '', message: '' }); const [sending, setSending] = useState(false); const [sent, setSent] = useState(false); const [fallbackMailto, setFallbackMailto] = useState(''); const [ticket, setTicket] = useState(''); const set = (k, v) => setForm((f) => ({ ...f, [k]: v })); const submit = async (e) => { e.preventDefault(); if (!form.name || !form.email || !form.message) return; setSending(true); setFallbackMailto(''); setTicket(''); const payload = { kind: 'contact', name: form.name, email: form.email, project: form.project, category: form.type, budget: form.budget, message: form.message, }; try { const result = await submitInquiry(payload); setTicket(result.ticket || ''); setSent(true); } catch (error) { const mailto = buildInquiryMailto(payload); setFallbackMailto(mailto); window.location.href = mailto; setSent(true); } finally { setSending(false); } }; if (sent) { return (
We'll get back to you within 72 hours. Often sooner when the queue is light.
{ticket &&Ticket {ticket}
} {fallbackMailto && (Got a character to immortalize, a vintage piece to recreate, or just a half-formed idea? Drop us a line and we'll come back within 72 hours.