getChartLoadingStateProps (chart-library/chartLoadingStateUtils.ts)

langfuse · web/src/features/widgets/chart-library/chartLoadingStateUtils.ts · typescript · MIT
ui, tag:embed-classified

Module exposing: getChartLoadingStateProps, getChartLoadingProgress

// Source: https://github.com/langfuse/langfuse | License: MIT | Copyright 2023-2026 ClickHouse, Inc
// Provided via justclaw.it.com; keep this notice with the code.
import { RESOURCE_LIMIT_ERROR_MESSAGE } from "@langfuse/shared";
import { type QueryProgress } from "@/src/hooks/useSSEDashboardQuery";

type ChartQueryState = {
  isPending: boolean;
  isError: boolean;
  errorMessage?: string | null;
};

type ChartLoadingProps = {
  isLoading: boolean;
  showSpinner: boolean;
  showHintImmediately: boolean;
  hintText?: string;
};

export function getChartLoadingStateProps({
  isPending,
  isError,
  errorMessage,
}: ChartQueryState): ChartLoadingProps {
  return {
    isLoading: isPending || isError,
    showSpinner: isPending,
    showHintImmediately: isError,
    hintText: isError
      ?

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key