// Welcome / hero landing page — dismissed on click, scroll, or key press function WelcomeOverlay({ onDismiss }) { const [leaving, setLeaving] = useState(false); const dismissed = useRef(false); const [authed, setAuthed] = useState(!!window.OCMS_USER); useEffect(() => { if (authed) return; const handler = () => setAuthed(true); window.addEventListener('ocms:user-ready', handler); return () => window.removeEventListener('ocms:user-ready', handler); }, []); const dismiss = () => { if (!authed) return; if (dismissed.current) return; dismissed.current = true; setLeaving(true); setTimeout(onDismiss, 480); }; useEffect(() => { const onKey = (e) => { if (["Escape", " ", "Enter", "ArrowDown", "PageDown"].includes(e.key)) dismiss(); }; const onWheel = (e) => { if (Math.abs(e.deltaY) > 4) dismiss(); }; const onTouch = () => dismiss(); window.addEventListener("keydown", onKey); window.addEventListener("wheel", onWheel, { passive: true }); window.addEventListener("touchmove", onTouch, { passive: true }); return () => { window.removeEventListener("keydown", onKey); window.removeEventListener("wheel", onWheel); window.removeEventListener("touchmove", onTouch); }; }, []); return (
The single source of truth for APA terminal contracts, rates, rebates and total cost of ownership — purpose-built for Ocean Finance, Procurement and Rate Focal teams.
{/* Module illustration row */}