/* ========================================================= 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 ) : ( Your name * {err.name && {err.name}} Email * {err.email && {err.email}} Business / organisation What's the problem? * {err.problem && {err.problem}} Send it over We reply within 24 hours · care@shadowbiz.in · Built with care in India )} ); } function Footer() { const cols = [ ["Studio", [["Why we exist", "#belief"], ["Method", "#method"], ["What we do", "#work"], ["Who we are", "#about"]]], ["Products", [["Crestly · live", "#products"], ["Stockloom · 2027", "#products"], ["The 14-schools story", "#story"], ["Talk to us", "#contact"]]], ]; return ( ); } Object.assign(window, { Contact, Footer });
No pitch deck, no pre-built product. Describe what's not working and we'll come back with questions — usually within 24 hours.
Thanks, {f.name.split(" ")[0] || "there"}. We read every note ourselves and reply within 24 hours.