/* Contact page */ /* ---- Replace this with your actual web3forms access key ---- */ const WEB3FORMS_KEY = "f5e0597a-f4b2-4bf3-bd31-8838a14de4b8"; /* Read quiz result from localStorage (expires after 7 days) */ function getQuizResult() { try { const raw = localStorage.getItem("smbe_quiz"); if (!raw) return null; const v = JSON.parse(raw); if (Date.now() - v.ts > 7 * 24 * 60 * 60 * 1000) return null; return v; // { id, label, ts } } catch(e) { return null; } } function ContactPage({ basePath }) { const [submitted, setSubmitted] = React.useState(false); const [sending, setSending] = React.useState(false); const [step, setStep] = React.useState(1); const [quizResult] = React.useState(() => getQuizResult()); const [form, setForm] = React.useState({ name: "", business: "", email: "", phone: "", tier: quizResult ? quizResult.id : "", budget: "", timeline: "", help: "", }); const update = (k, v) => setForm({ ...form, [k]: v }); const onSubmit = async (e) => { e.preventDefault(); setSending(true); const tierLabel = TIERS.find((t) => t.id === form.tier)?.label || form.tier; const payload = { access_key: WEB3FORMS_KEY, subject: `New enquiry from ${form.business}`, name: form.name, email: form.email, phone: form.phone || "Not provided", business: form.business, tier: tierLabel, budget: form.budget || "Not specified", timeline: form.timeline || "Not specified", message: form.help, ...(quizResult ? { quiz_recommendation: quizResult.label } : {}), }; try { const res = await fetch("https://api.web3forms.com/submit", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(payload), }); const data = await res.json(); if (data.success) { setSubmitted(true); } else { alert("Something went wrong sending your message. Please WhatsApp or email us directly."); } } catch(err) { alert("Something went wrong sending your message. Please WhatsApp or email us directly."); } finally { setSending(false); } }; return ( <>
Let's chat

Tell us what
you need.

A 20-minute call, free. We'll listen, ask good questions, and tell you honestly whether we're the right fit. If we're not, we'll point you somewhere better.

HoursMon–Fri · 9am–6pm BST
Reply withinA few hours, usually faster
Based inKent · working everywhere
{!submitted ? (
{[1, 2, 3].map((n) => (
= n ? " on" : "") + (step === n ? " current" : "")}>
{step > n ? "✓" : n}
{["About you", "Your project", "Budget & timing"][n - 1]}
))}
{step === 1 && (

Hi, who are we talking to?

Just the basics — we'll dig deeper on the call.

)} {step === 2 && (

What's the project about?

Pick a tier and tell us a bit. Don't worry about getting it perfect.

{quizResult && (
Based on your quiz, we've pre-selected {quizResult.label} for you — feel free to change it.
)}
{TIERS.map((t) => ( ))}