// Live Discoveries ticker. Items animate in from the bottom. // Simulates new edges arriving from the Bright Data scraper. window.DiscoveriesTicker = function DiscoveriesTicker() { const seed = window.FORGE_DISCOVERIES; const futures = window.FORGE_FUTURE_DISCOVERIES; const [items, setItems] = React.useState(seed.slice(0, 6).map((d, i) => ({ ...d, _id: i, _t: Date.now() + d.ts_offset * 1000 }))); const idRef = React.useRef(seed.length); const futIdxRef = React.useRef(0); React.useEffect(() => { const interval = setInterval(() => { const next = futures[futIdxRef.current % futures.length]; futIdxRef.current += 1; const item = { ...next, _id: idRef.current++, _t: Date.now() }; setItems(prev => [item, ...prev].slice(0, 6)); }, 5200); return () => clearInterval(interval); }, []); return (