Skip to content

Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.

713 B
Raw Blame
import { Badge, VisuallyHidden } from '@chakra-ui/react';
import { useProblemCount } from '@workbench/diagnostics/useProblemCount';
import { useActiveProjectId } from '@workbench/WorkbenchContext';
import { BugIcon } from 'lucide-react';
import { useTranslation } from 'react-i18next';

export const DiagnosticsHeaderActions = () => {
  const { t } = useTranslation();
  const problemCount = useProblemCount(useActiveProjectId());

  if (problemCount === 0) {
    return null;
  }

  return (
    <Badge colorPalette="red">
      <BugIcon />
      <span aria-hidden>{problemCount}</span>
      <VisuallyHidden>{t('widgets.diagnostics.chipProblems', { count: problemCount })}</VisuallyHidden>
    </Badge>
  );
};