const WHATSAPP_NUMBER = '5491133720000'; function Contact({ theme, t, contactRef }) { const [form, setForm] = React.useState({ name: '', email: '', interest: t.contact.interests[0], message: '' }); const [sent, setSent] = React.useState(false); const submit = (e) => { e.preventDefault(); const greet = t.ui.whatsappGreet || 'Β‘Hola La Salsera!'; const intro = t.ui.whatsappIntro || 'Soy'; const interest = t.ui.whatsappInterest || 'Me interesa'; const emailLabel = t.ui.whatsappEmail || 'mi email'; const lines = [ `${greet} πŸ‘‹`, ``, `${intro} ${form.name}.`, `${interest}: ${form.interest}.`]; if (form.message.trim()) { lines.push(``, form.message.trim()); } lines.push(``, `(${emailLabel}: ${form.email})`); const text = encodeURIComponent(lines.join('\n')); const url = `https://wa.me/${WHATSAPP_NUMBER}?text=${text}`; window.open(url, '_blank', 'noopener,noreferrer'); setSent(true); setTimeout(() => setSent(false), 4000); }; return (
{t.contact.kicker} {t.contact.title}
{/* Location */}
{t.ui.addressLabel}
{t.contact.address}
{t.contact.hoursTitle}
{t.contact.hoursLine}
{[ { name: 'WhatsApp', icon: 'assets/social/whatsapp.png', url: 'https://wa.me/message/LNRZZI7DNWANB1' }, { name: 'Instagram', icon: 'assets/social/instagram.png', url: 'https://www.instagram.com/lasalseracom/' }, { name: 'Facebook', icon: 'assets/social/facebook.png', url: 'https://www.facebook.com/lasalsera.multiespacioafrolatino' }, { name: 'YouTube', icon: 'assets/social/youtube.png', url: 'https://www.youtube.com/user/lasalseracom' }, { name: 'TikTok', icon: 'assets/social/tiktok.png', url: 'https://www.tiktok.com/@lasalseracom' }]. map((s) => e.currentTarget.style.transform = 'scale(1.08)'} onMouseLeave={(e) => e.currentTarget.style.transform = 'none'} > {s.name} )}
{/* Form */}
{t.contact.formTitle}

{t.contact.formLead}

setForm({ ...form, name: e.target.value })} style={inputStyle(theme)} /> setForm({ ...form, email: e.target.value })} style={inputStyle(theme)} />
{t.contact.interests.map((opt) => { const active = form.interest === opt; return ( ); })}