// Agora App — main router + state. const { useState, useEffect } = React; const App = () => { const [route, setRoute] = useState({ name:'home' }); const [watchlist, setWatchlist] = useState(new Set(['i02','i05','i08'])); const [cart, setCart] = useState([]); // Scroll-to-top on route change useEffect(() => { window.scrollTo({ top: 0, behavior: 'instant' }); }, [route]); const toggleWatch = (id) => { setWatchlist(s => { const ns = new Set(s); ns.has(id) ? ns.delete(id) : ns.add(id); return ns; }); }; const ctx = { route, setRoute, watchlist, toggleWatch, cart, setCart }; return (