// ============================================================ // Qestylo — final CTA + contact + footer + App // ============================================================ const { useState, useEffect, useRef, useCallback } = React; // ---------------- 9 · CONTACTO + CTA FINAL ---------------- function Contacto({ prefillMessage }) { const [form, setForm] = useState({ nombre: '', telefono: '', mensaje: '' }); const [touched, setTouched] = useState(false); const [sent, setSent] = useState(false); const [isSubmitting, setIsSubmitting] = useState(false); useEffect(() => { if (prefillMessage) { setForm((f) => ({ ...f, mensaje: prefillMessage })); } }, [prefillMessage]); const errors = { nombre: form.nombre.trim().length < 2, telefono: !/^[0-9+\s]{6,}$/.test(form.telefono.trim()), }; const valid = !errors.nombre && !errors.telefono; const set = (k) => (e) => setForm((f) => ({ ...f, [k]: e.target.value })); const submit = async () => { setTouched(true); if (!valid) return; setIsSubmitting(true); try { await fetch('https://formsubmit.co/ajax/qestylo@qestylo.com', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Accept': 'application/json' }, body: JSON.stringify({ _subject: `Nuevo Presupuesto Web — ${form.nombre}`, _template: 'box', Nombre: form.nombre, Teléfono: form.telefono, Detalles: form.mensaje || 'No especificado' }) }); } catch (error) { console.error('Error enviando formulario:', error); } finally { setIsSubmitting(false); setSent(true); } }; const field = (label, key, props = {}) => (
{key === 'nombre' ? 'Dinos tu nombre.' : 'Necesitamos un teléfono válido.'}
)}Cuéntanos qué quieres cambiar y te respondemos sin compromiso. ¿Prefieres ver toda nuestra obra primero? Te llevamos a{' '} qestylo.com.
{/* Contact info grid */}Teléfono
983 266 408Email / Gmail
qestylo@qestylo.comDirección
C/ Puente Colgante 16, 47007 ValladolidPresupuesto sin compromiso · Respuesta en menos de 24 h · Instalación con la cobertura de la Red Oficial Kömmerling (CAES).