/* ========================================================= Shadowbiz — part3.jsx : Contact (validated form), Footer ========================================================= */ function Contact() { const [f, setF] = useState({ name: "", email: "", company: "", problem: "" }); const [err, setErr] = useState({}); const [sent, setSent] = useState(false); const set = (k) => (e) => { setF(p => ({ ...p, [k]: e.target.value })); if (err[k]) setErr(p => ({ ...p, [k]: null })); }; const validate = () => { const e = {}; if (!f.name.trim()) e.name = "Tell us who we're talking to."; if (!f.email.trim()) e.email = "We need a way to reply."; else if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(f.email.trim())) e.email = "That email doesn't look right."; if (!f.problem.trim()) e.problem = "Name the problem — even roughly."; else if (f.problem.trim().length < 12) e.problem = "A little more detail helps us help you."; return e; }; const submit = (ev) => { ev.preventDefault(); const e = validate(); setErr(e); if (Object.keys(e).length === 0) setSent(true); }; const channels = [ ["mail", "Email", "care@shadowbiz.in"], ["phone", "Phone", "+1 555-969-3548"], ["globe", "Web", "shadowbiz.in"], ]; return (
08 Start a conversation

Tell us the problem.
We'll listen first.

No pitch deck, no pre-built product. Describe what's not working and we'll come back with questions — usually within 24 hours.

{channels.map(([ic, k, v]) => (
{k} {v}
))}
{sent ? (

Message received.

Thanks, {f.name.split(" ")[0] || "there"}. We read every note ourselves and reply within 24 hours.

{ setSent(false); setF({ name: "", email: "", company: "", problem: "" }); }} type="button">Send another
) : (
{err.name &&
{err.name}
}
{err.email &&
{err.email}
}