MCPcopy Index your code
hub / github.com/simstudioai/sim / useDashboardStats

Function useDashboardStats

apps/sim/hooks/queries/logs.ts:254–267  ·  view source on GitHub ↗
(
  workspaceId: string | undefined,
  filters: Omit<LogFilters, 'limit' | 'sortBy' | 'sortOrder'>,
  options?: UseDashboardStatsOptions
)

Source from the content-addressed store, hash-verified

252}
253
254export 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
269export type { ExecutionSnapshotData }
270

Callers 1

LogsFunction · 0.90

Calls 1

fetchDashboardStatsFunction · 0.85

Tested by

no test coverage detected