- Migrated useDashboard hook from useState/useEffect to React Query - Added query key factory: dashboardQueryKeys for proper cache management - Configured staleTime: 30 seconds (dashboard data changes frequently) - Configured gcTime: 2 minutes (keeps data in cache) - Added retry: 1 with retryDelay: 1000ms for automatic retry - Preserved backward compatibility: same return interface - Dashboard data now automatically cached and deduplicated - Multiple components using useDashboard share cached data - Automatic background refetching when data becomes stale - Better performance and reduced API calls - Action 2.1.1.7 complete - Sub-Epic 2.1.1 complete |
||
|---|---|---|
| .. | ||
| useDashboard.ts | ||