( workspaceId: string | undefined, filters: Omit<LogFilters, 'limit' | 'sortBy' | 'sortOrder'>, options?: UseDashboardStatsOptions )
| 252 | } |
| 253 | |
| 254 | export function useDashboardStats( |
| 255 | workspaceId: string | undefined, |
| 256 | filters: Omit<LogFilters, 'limit' | 'sortBy' | 'sortOrder'>, |
| 257 | options?: UseDashboardStatsOptions |
| 258 | ) { |
| 259 | return useQuery({ |
| 260 | queryKey: logKeys.stat(workspaceId, filters), |
| 261 | queryFn: ({ signal }) => fetchDashboardStats(workspaceId as string, filters, signal), |
| 262 | enabled: Boolean(workspaceId) && (options?.enabled ?? true), |
| 263 | refetchInterval: options?.refetchInterval ?? false, |
| 264 | staleTime: 30 * 1000, |
| 265 | placeholderData: keepPreviousData, |
| 266 | }) |
| 267 | } |
| 268 | |
| 269 | export type { ExecutionSnapshotData } |
| 270 |
no test coverage detected