// Medway MSS — Contact + Footer (with full legal block, real Togo data) function Contact({ accent, t, lang }) { const isMobile = useIsMobile(); const [form, setForm] = React.useState({ name: '', org: '', email: '', message: '', website: '' }); const [status, setStatus] = React.useState('idle'); // 'idle' | 'sending' | 'sent' | 'error' const [errorMsg, setErrorMsg] = React.useState(''); const onChange = (k) => (e) => setForm({ ...form, [k]: e.target.value }); const submit = async (e) => { e.preventDefault(); if (status === 'sending') return; setStatus('sending'); setErrorMsg(''); try { const res = await fetch('/api/contact', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ ...form, lang }), }); const data = await res.json().catch(() => ({})); if (!res.ok || !data.ok) { throw new Error(data.error || 'Request failed'); } setStatus('sent'); setForm({ name: '', org: '', email: '', message: '', website: '' }); setTimeout(() => setStatus('idle'), 5000); } catch (err) { setStatus('error'); setErrorMsg(err && err.message ? err.message : 'Network error'); } }; const sent = status === 'sent'; const sending = status === 'sending'; const inputStyle = { width: '100%', boxSizing: 'border-box', padding: '14px 0', fontFamily: 'Inter, sans-serif', fontSize: 15, color: '#fafafa', background: 'transparent', border: 'none', borderBottom: '1px solid #404040', outline: 'none', transition: 'border-color 150ms ease', }; const labelStyle = { fontFamily: 'Inter, sans-serif', fontSize: 11, fontWeight: 600, letterSpacing: '0.14em', textTransform: 'uppercase', color: '#a3a3a3', display: 'block', marginBottom: 8, }; const infoBlocks = [ { l: t('contact.info.proc.l'), v: 'hakan@medwaymss.com', sub: t('contact.info.proc.s'), href: 'mailto:hakan@medwaymss.com' }, { l: t('contact.info.gen.l'), v: 'www.medwaymss.com', sub: t('contact.info.gen.s'), href: 'https://www.medwaymss.com' }, { l: t('contact.info.tel.l'), v: '+228 90 71 20 20', vsub: '+228 90 06 35 09', sub: t('contact.info.tel.s'), href: 'tel:+22890712020' }, { l: t('contact.info.addr.l'), v: 'Djidjolé, Avenue des Evala', vsub: 'Immeuble KOUNOUBIE, Lomé', sub: t('contact.info.addr.s') }, { l: t('contact.info.bank.l'), v: 'Bank Of Africa – Togo', vsub: 'N° 0196001000', sub: t('contact.info.bank.s') }, ]; return ( {t('contact.eyebrow')} § 04 / 04 {t('contact.title.1')}{t('contact.title.2')} {infoBlocks.map((c) => ( {c.l} {c.href ? ( {c.v} ) : ( {c.v} )} {c.vsub && ( {c.vsub} )} {c.sub} ))} {t('form.name')} {t('form.org')} {t('form.email')} {t('form.msg')} {/* Honeypot — bots fill this; humans never see it */} {sent ? t('form.sent') : (sending ? t('form.sending') : t('form.submit'))} WhatsApp {t('form.reply')} {status === 'error' && ( {t('form.error')}{errorMsg ? ` — ${errorMsg}` : ''} )} ); } function Footer({ accent, onNav, t }) { const isMobile = useIsMobile(); return ( ); } Object.assign(window, { Contact, Footer });