// ============================================================ // LANDING — shared bits (Request Access modal) // ============================================================ // Imported by landing-c.jsx. The modal POSTs to /landing/request-access // which writes to the platform DB so an admin can follow up with an // invite code. const { useState: useStL } = React; function RequestAccessModal({ open, onClose }) { const [submitted, setSubmitted] = useStL(false); const [submitting, setSubmitting] = useStL(false); const [error, setError] = useStL(null); const [email, setEmail] = useStL(''); const [company, setCompany] = useStL(''); const [role, setRole] = useStL('ops'); if (!open) return null; const onSubmit = async (e) => { e.preventDefault(); if (submitting) return; setSubmitting(true); setError(null); try { const resp = await fetch('/landing/request-access', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ email: email.trim().toLowerCase(), company: company.trim(), role }), }); if (!resp.ok) { const data = await resp.json().catch(() => ({})); throw new Error(data.detail || `Request failed (${resp.status})`); } setSubmitted(true); } catch (err) { setError(err.message); } finally { setSubmitting(false); } }; // Inline colors instead of var() — the landing page doesn't carry a // data-theme attribute, so the portal's themed tokens (--surface, // --text-strong, --border, …) resolve to empty here and the modal // would render transparent. Hardcoding keeps the modal looking like // a real card against the dark page. const C = { ink: '#1A1714', ink2: '#2F2A24', ink3: '#58524A', ink4: '#847C71', paper: '#FBFAF7', paperSunk: '#F5F3EE', rule: '#E6E1D6', accent: '#FF7A59', successSoft:'#D1FAE5', success: '#047857', errSoft: '#FEE2E2', err: '#B91C1C', }; return (
We'll be in touch within two business days with an invite code and a short call to learn about your process.