Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

587 B
Raw Blame
import { useCurrentSystemStatusQuery } from '@queries/system-status/status';
import { type BannerStatus, bannerStatus } from '../core/status';

/**
 * The banner every user sees while Macro is not operational. Never suspends:
 * until the status loads, and through failed refetches, it shows whatever was
 * last known (nothing at first).
 */
export function useBannerStatus(): () => BannerStatus | undefined {
  const query = useCurrentSystemStatusQuery();
  return () => {
    if (query.isPending) return undefined;
    return query.data ? bannerStatus(query.data) : undefined;
  };
}