# Task 14: Fix AchievementsTab Nesting - Context Summary ## Current State (Problem) ### Redundant Nested Layers Found: 1. **Nested GameCards (Double Card Wrapper)** - `AchievementsTab.tsx` wraps everything in a `` (lines 16-42) - `AchievementsDisplay.tsx` ALSO wraps everything in a `` (line 63) - This creates nested cards - a card inside a card - which is redundant and causes visual/structural issues 2. **Duplicate Headings** - `AchievementsTab.tsx` has an `

` heading "Achievements" with badge showing `{unlockedCount} unlocked` (lines 19-26) - `AchievementsDisplay.tsx` has an `

` heading "Achievements" with badge showing `{unlockedCount} / {totalCount}` (lines 64-72) - Both components render their own heading - this is redundant ### File Analysis: #### AchievementsTab.tsx Structure: ```
← OUTER CARD (should be removed)

Achievements

← OUTER HEADING (should be removed) ← This component brings its own Card + Heading
``` #### AchievementsDisplay.tsx Structure: ``` ← INNER CARD (should stay)

Achievements

← INNER HEADING (should stay) {/* achievement categories */}
``` ## Correct Structure (After Fix) The `AchievementsTab` should NOT wrap `AchievementsDisplay` in a GameCard or provide its own heading. The correct structure is: ### AchievementsTab.tsx (Fixed): ```
← Only render the display component, no wrapping
``` ### AchievementsDisplay.tsx (Unchanged): ``` ← Single card wrapper

Achievements

← Single heading {/* achievement categories */}
``` ## Summary of Changes Needed: 1. **Remove GameCard wrapper from AchievementsTab.tsx** - Let AchievementsDisplay handle the card 2. **Remove the h2 heading and badge from AchievementsTab.tsx** - Let AchievementsDisplay handle the heading 3. **Keep AchievementsDisplay.tsx as-is** - It already has the correct structure This eliminates the double-nesting and duplicate headings issue.