diff --git a/components/CollaboratorFacepile.js b/components/CollaboratorFacepile.js index a89fb75..9291f3a 100644 --- a/components/CollaboratorFacepile.js +++ b/components/CollaboratorFacepile.js @@ -73,6 +73,14 @@ export default function CollaboratorFacepile({ collectionId, creatorEmail }) { } }; + console.log('CollaboratorFacepile render:', { + collectionId, + creatorEmail, + collaborators: collaborators.length, + allUsers: allUsers.length, + loading + }); + return (
diff --git a/pages/collection/[id].js b/pages/collection/[id].js index 082d164..8b1a3e7 100644 --- a/pages/collection/[id].js +++ b/pages/collection/[id].js @@ -299,12 +299,17 @@ export default function CollectionView() { return acc; }, {}); - // Get game display names and counts - const gameStats = { - 'MTG': groupedCards['MTG']?.length || 0, - 'Lorcana': groupedCards['Lorcana']?.length || 0, - 'Pokemon': groupedCards['Pokemon']?.length || 0 - }; + // Debug: Log the grouped cards to see what games we have + console.log('Grouped cards:', groupedCards); + console.log('Available games:', Object.keys(groupedCards)); + + // Get game display names and counts - make it more flexible + const gameStats = {}; + Object.keys(groupedCards).forEach(game => { + if (game && game !== 'Other') { + gameStats[game] = groupedCards[game].length; + } + }); if (loading) { return ( @@ -393,10 +398,17 @@ export default function CollectionView() { {/* Creator and Stats */}
- + {console.log('Collection data for facepile:', { id, creator_email: collection.creator_email, collection })} + {collection.creator_email ? ( + + ) : ( + + Crafted by Unknown User + + )}
Cards: {cards.length}
Cost: ${collection.totalValue || '0'}