Files
botsmann/app
g-butandClaude Opus 4.5 4d9a76435e refactor: extract dashboard stats to custom hook and use DocumentStatusBadge
- Created useDashboardStats hook for data fetching logic
- Simplified dashboard page by extracting state management
- Updated dashboard to use DocumentStatusBadge component
- Updated my-data page to use DocumentStatusBadge component
- Replaced magic status strings with DOCUMENT_STATUS constants

Benefits:
- Dashboard page reduced from ~100 lines of state logic to ~10 lines
- Status badge logic now in single location (SSOT)
- Data loading logic is now testable in isolation
- Consistent status display across all pages

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 19:03:19 +01:00
..