// LeadForm — sticky right-rail lead capture for the Expeditions landing page. // Card chrome only; submission is handled by the embedded Marketing-Cloud iframe. // On successful submit the iframe redirects to ?success=true, which flips this // card into the confirmation state. function LeadForm({ defaultExpedition }) { const isSuccess = React.useMemo(() => { if (typeof window === "undefined") return false; return new URLSearchParams(window.location.search).get("success") === "true"; }, []); if (isSuccess) { const focus = defaultExpedition || "your Expedition"; return ( ); } return ( ); } window.LeadForm = LeadForm;