diff --git a/src/components/CardRow/CardRow.jsx b/src/components/CardRow/CardRow.jsx index b19e7f3..096bc74 100644 --- a/src/components/CardRow/CardRow.jsx +++ b/src/components/CardRow/CardRow.jsx @@ -8,9 +8,10 @@ function CardRow({ card }) { const toggleExpand = () => setExpandedCardId(isExpanded ? null : card.id); - // Calculate total owned across all printings + // ✅ Calculate total owned across all printings using combined key const totalOwned = card.printings?.reduce((sum, p) => { - const owned = ownedAmounts[card.id]?.[p.set_id] ?? p.amount_owned ?? 0; + const key = `${p.set_id}-${p.rarity_id}`; + const owned = ownedAmounts[card.id]?.[key] ?? p.amount_owned ?? 0; return sum + owned; }, 0) ?? 0;