Frontend: Dashboard Horizontal Deck Sections (consume profileService)
This is a one week ticket
Task
Implement the three horizontally scrollable deck sections on the Dashboard, stacked vertically, replacing the old labels per Figma:
Recent
Up Next (was “Related Topics” in Figma)
Completed (replaces “Same Level”)
Implementation Requirements
In Dashboard.tsx, render three vertical sections with headers: Recent , Up Next , Completed .
Each section uses a horizontal FlatList (or ScrollView) of DeckCover.tsx cards.
Do not reimplement categorization. Call the backend service:
getCategorizedDecks(activeProfileId, allDecks) → returns { recent, upNext, completed }.
Load deck metadata from act_safety_decks.json; pass proper props (title, difficulty, category) to DeckCover.tsx.
When the active profile changes (via SwitchUserModal), re-query getCategorizedDecks(...) and refresh all three lists.
Styling via NativeWind only; match Figma spacing, paddings, and card sizing.
Smooth horizontal scroll left→right; section headers are bold and aligned per Figma.
Data/Behavior (consumption only)
Recent: use the recent array returned by the service (already sorted by lastOpenedAt desc).
Up Next: use the upNext array (unopened decks).
Completed: use the completed array (finished decks).
Handle empty states gracefully (if any array is empty, show nothing for that section—no warnings).
Set up
Testing
Acceptance Criteria
Resources
Frontend: Dashboard Horizontal Deck Sections (consume profileService)
This is a one week ticket
Task
Implement the three horizontally scrollable deck sections on the Dashboard, stacked vertically, replacing the old labels per Figma:
Implementation Requirements
Dashboard.tsx, render three vertical sections with headers: Recent, Up Next, Completed.FlatList(orScrollView) ofDeckCover.tsxcards.getCategorizedDecks(activeProfileId, allDecks)→ returns{ recent, upNext, completed }.act_safety_decks.json; pass proper props (title, difficulty, category) toDeckCover.tsx.SwitchUserModal), re-querygetCategorizedDecks(...)and refresh all three lists.Data/Behavior (consumption only)
recentarray returned by the service (already sorted bylastOpenedAtdesc).upNextarray (unopened decks).completedarray (finished decks).Set up
useDashboardDecks(profileId)that:getCategorizedDecks(profileId, allDecks).{ recent, upNext, completed, refresh }.profileIdchanges.Dashboard.tsxto the hook; triggerrefreshon profile switch events.Testing
Acceptance Criteria
profileService.getCategorizedDecks()and reflects current user progress.viewedCountorviewedCount == 0).viewedCount == totalCount).Resources