- Add utils/export.ts for centralized CSV export functionality
- Add EmptyState component for consistent empty state UI
- Add Pagination component for reusable pagination controls
- Refactor employe/gains-client to use apiFetch and EmptyState
- Refactor employe/historique to use apiFetch and EmptyState
- Export new components from ui/index.ts
Target: reduce duplication from 13.93% to under 3%
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Replace all instances of process.env.NEXT_PUBLIC_API_URL with
API_BASE_URL constant for consistency and to ensure the API URL
is properly defined at runtime.
Files updated:
- app/admin/marketing-data/page.tsx
- app/admin/tirages/page.tsx
- app/employe/dashboard/page.tsx
- app/employe/gains-client/page.tsx
- app/employe/historique/page.tsx
- components/admin/TicketManagement.tsx
This fixes the "undefined" API URL issue that was preventing
API calls from working correctly.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>