// pages/contato.jsx — Página "Contato" const BrandIcons = { Instagram: ( ), Facebook: ( ), YouTube: ( ), LinkedIn: ( ), Volunteer: ( ), }; function ContactForm() { var [form, setForm] = React.useState({ name: '', email: '', subject: 'Doação', message: '', _gotcha: '' }); var [status, setStatus] = React.useState('idle'); var isMobile = useWindowWidth() < 768; function handleChange(e) { var k = e.target.name, v = e.target.value; setForm(function(p) { return Object.assign({}, p, { [k]: v }); }); } function handleSubmit(e) { e.preventDefault(); setStatus('sending'); fetch('api/contact.php', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(form), }) .then(function(r) { return r.json(); }) .then(function(d) { setStatus(d.ok ? 'success' : 'error'); }) .catch(function() { setStatus('error'); }); } var fieldStyle = { fontFamily: 'var(--sans)', fontSize: 14, padding: '11px 14px', border: '1.5px solid var(--line-strong)', borderRadius: 6, background: 'var(--paper)', color: 'var(--ink)', outline: 'none', width: '100%', boxSizing: 'border-box', transition: 'border-color .15s', }; if (status === 'success') { return (
Mensagem enviada!

Recebemos sua mensagem e retornaremos em breve.

); } return (
{/* Honeypot — captura bots que preenchem campos ocultos */}
{[ { name: 'name', label: 'Nome', type: 'text', placeholder: 'Seu nome' }, { name: 'email', label: 'E-mail', type: 'email', placeholder: 'seu@email.com' }, ].map(function(f) { return (
); })}