// CONTACT page function ContactApp() { const [lang, setLang] = useLang(); const t = mergeT(lang); const [submittedC, setSubmittedC] = React.useState(false); const [submittingC, setSubmittingC] = React.useState(false); const [errorC, setErrorC] = React.useState(""); const cp = t.contact_page; const info = cp.info; return ( <> { e.preventDefault(); setErrorC(""); setSubmittingC(true); const fd = new FormData(e.target); const payload = { name: fd.get("name") || "", email: fd.get("email") || "", phone: fd.get("phone") || "", subject: fd.get("subject") || "", message: fd.get("message") || "", }; try { const res = await fetch("/api/remodeling-contact", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(payload), }); const j = await res.json(); if (j.success) { setSubmittedC(true); e.target.reset(); window.scrollTo({ top: 0, behavior: "smooth" }); } else { setErrorC(j.error || "Submission failed."); } } catch (err) { setErrorC(lang === "en" ? "Network error. Please call (737) 354-7787." : "Error de red. Llama (737) 354-7787."); } finally { setSubmittingC(false); } }}> {submittedC && ( {lang === "en" ? "✓ Message sent. We'll be in touch within one business day." : "✓ Mensaje enviado. Te contactamos en menos de un día hábil."} )} {errorC && ( ⚠️ {errorC} )} {cp.form_h} {t.quote_page.form.name} {t.quote_page.form.email} {t.quote_page.form.phone} {t.quote_page.form.zip} {lang === 'en' ? 'Subject' : 'Asunto'} {lang === 'en' ? 'Message' : 'Mensaje'} {lang === 'en' ? 'Send Message' : 'Enviar Mensaje'} {lang === 'en' ? 'Reach us directly' : 'Contáctanos directamente'} {info.addr_lbl} {info.addr_val} {info.phone_lbl} {info.phone_val} {info.email_lbl} help@prospecdesign.com — {lang === 'en' ? 'Customer support' : 'Soporte al cliente'} hello@prospecdesign.com — {lang === 'en' ? 'General inquiries' : 'Consultas generales'} info@prospecdesign.com — {lang === 'en' ? 'Information' : 'Información'} lissy@prospecdesign.com — {lang === 'en' ? 'Partnerships' : 'Soporte para alianzas'} wellyton@prospecdesign.com — {lang === 'en' ? 'Technical support' : 'Soporte técnico'} {info.hours_lbl} {info.hours_val} {cp.socials_h} {/* Service area */} {cp.area_h} {cp.area_p} > ); } ReactDOM.createRoot(document.getElementById("app")).render();
{cp.area_p}