--- /** * WaitlistForm — email capture with progressive enhancement. * - Works with NO JS: native POST to /api/waitlist → 303 back to /?waitlist=ok. * - With JS: fetch + inline success state, no navigation. * Reused in the hero, final CTA, and footer via the `source` prop (attribution). * The script is bound on astro:page-load so it survives ClientRouter SPA swaps. */ interface Props { source: string; // 'hero' | 'final' | 'footer' … id?: string; // wrapper id; pass "waitlist" on the hero for the #waitlist anchor layout?: 'row' | 'stack'; microcopy?: string; class?: string; } const { source, id, layout = 'row', microcopy = 'Get early-access invites and the occasional product update — no spam, unsubscribe anytime.', class: cls = '', } = Astro.props; const emailId = `wl-email-${source}`; const hpId = `wl-hp-${source}`; ---
Please enter a valid email address and try again.
{microcopy} · Privacy policy
) }