// Contact page with working form + validation const ContactPage = ({ showToast }) => { useLucide(); const [form, setForm] = React.useState({ name: '', email: '', phone: '', intent: 'buying', message: '', contactBy: 'email', }); const [err, setErr] = React.useState({}); const [sent, setSent] = React.useState(false); const submit = (e) => { e.preventDefault(); const next = {}; if (!form.name.trim()) next.name = 'Please tell me your name'; if (!form.email.includes('@') || form.email.length < 5) next.email = 'A real email please'; if (!form.message.trim() || form.message.length < 10) next.message = 'A bit more context helps — even one line'; setErr(next); if (Object.keys(next).length === 0) { setSent(true); showToast("Sent — I'll reply within 24 hours. Thank you."); setForm({ name: '', email: '', phone: '', intent: 'buying', message: '', contactBy: 'email' }); setTimeout(() => setSent(false), 6000); } }; return (
The form goes straight to my inbox. For anything urgent, the phone is faster — I usually answer between 8am and 8pm.
I'll get back to you within 24 hours.