fix(my-cards): collection display — summary + cards.map + empty-state + debug guard; branch fix/my-cards-collection-display
This commit is contained in:
parent
e733dc5a13
commit
4c1d22b935
1 changed files with 8 additions and 3 deletions
|
|
@ -416,6 +416,11 @@ export default function MyCards() {
|
|||
: 'space-y-4'
|
||||
}
|
||||
`}>
|
||||
{cards.length === 0 && !loading && (
|
||||
<div className="col-span-full text-center py-12" style={{ color: 'var(--text-secondary)' }}>
|
||||
<p>No cards loaded from /api/cards/owned (summary shows {collectionSummary?.totalCards ?? 'N/A'} via /api/user/stats).</p>
|
||||
</div>
|
||||
)}
|
||||
{cards.map((card) => (
|
||||
<CardItem
|
||||
key={card.id}
|
||||
|
|
@ -458,7 +463,7 @@ export default function MyCards() {
|
|||
|
||||
{/* No Cards Found */}
|
||||
{cards.length === 0 && !loading && (
|
||||
<div className="text-center py-20">
|
||||
<div className="text-center py-20" data-testid="my-cards-empty-state">
|
||||
<div className="glass-panel w-16 h-16 mx-auto mb-4 rounded-2xl flex items-center justify-center">
|
||||
<svg className="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24" style={{ color: 'var(--text-secondary)' }}>
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z" />
|
||||
|
|
|
|||
Loading…
Reference in a new issue