// Agora Watchlist — saved items with price-watch & offer history.
const Watchlist = ({ setRoute, watchlist, toggleWatch }) => {
const data = window.AG_DATA;
const items = data.items.filter(i => watchlist.has(i.id));
const [tab, setTab] = useState('all');
return (
Your watchlist
{items.length} pieces. Watching.
{[
{ id:'all', l:`All · ${items.length}` },
{ id:'offers', l:'My offers · 2' },
{ id:'dropped', l:'Price dropped · 1' },
{ id:'sold', l:'Sold · 0' },
].map(t => (
setTab(t.id)} className="ag-label" style={{ cursor:'pointer', padding:'12px 0', color: tab===t.id ? 'var(--ag-ink)':'var(--ap-fg-muted)', borderBottom: tab===t.id ? '2px solid var(--ag-ink)':'2px solid transparent', marginBottom: -1 }}>{t.l}
))}
{items.length === 0 ? (
Nothing saved yet.
Tap the heart on a piece to save it here.
) : (
{items.map(it => (
setRoute({ name:'product', id: it.id })}
onRemove={()=>toggleWatch(it.id)}
onCheckout={()=>setRoute({ name:'checkout', id: it.id })}
/>
))}
)}
{/* Activity */}
Recent activity
Watchlist events
{[
{ ago:'2h ago', t:'Hermès Kelly 28 Sellier · seller responded to your offer of €10,800', kind:'offer', red:true },
{ ago:'8h ago', t:'Chanel Classic Flap Medium · 3 more buyers watching', kind:'watch' },
{ ago:'1d ago', t:'Hermès Birkin 30 · price changed €15,400 → €14,800', kind:'price', red:true },
{ ago:'2d ago', t:'Maison Yoshino listed 2 new Hermès pieces matching your saved searches', kind:'new' },
].map((e, i) => (
))}
);
};
const WatchRow = ({ item, onClick, onRemove, onCheckout }) => {
// Fake some price-watching state
const dropped = item.id === 'i05';
const offered = item.id === 'i02';
return (
{item.brand} · {item.year}
{item.title}
Condition · {item.cond}
{item.watchers} other buyers watching
{dropped && (
Price dropped €600 in last 7 days
)}
{offered && (
Your offer of €4,500 is being reviewed · seller replied 2 hours ago
)}
{dropped &&
€15,400
}
€{item.eur.toLocaleString()}
{offered ? (
) : (
)}
);
};
window.Watchlist = Watchlist;