Commit Graph

3 Commits

Author SHA1 Message Date
467696e5b8 refactor: add more shared utilities and reduce duplication further
- 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>
2025-11-30 23:39:01 +01:00
34474cc275 fix: use API_BASE_URL constant instead of direct env access
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>
2025-11-18 15:07:49 +01:00
2f7abde4ea dev 2025-11-17 23:38:02 +01:00