diff --git a/src/views/CardEntry.tsx b/src/views/CardEntry.tsx index e3e9419..f93d07b 100644 --- a/src/views/CardEntry.tsx +++ b/src/views/CardEntry.tsx @@ -110,7 +110,10 @@ export function CardEntry() { const loc = intoDeck ? "" : location.trim(); if (loc) await api.setLocation(card.oracle_id, loc); if (deck) await sendToDeck(deck, card.oracle_id, entry); - setRecent((r) => [{ card, qty, location: loc, deck }, ...r].slice(0, 12)); + // Re-adding a card moves it to the top rather than listing it twice. + setRecent((r) => + [{ card, qty, location: loc, deck }, ...r.filter((e) => e.card.oracle_id !== card.oracle_id)].slice(0, 12), + ); setQuery(""); setResults([]); } @@ -197,8 +200,8 @@ export function CardEntry() { <>