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.

890 B
Raw Blame
import type { ProjectSummary } from '@workbench/projects/library';

import { Badge } from '@chakra-ui/react';
import { MIN_SUPPORTED_CANVAS_SCHEMA_VERSION } from '@workbench/canvasSchemaVersion';
import { isProjectSummaryCompatible } from '@workbench/projects/library';
import { useTranslation } from 'react-i18next';

/** A stable library-level cue; opening the editor is too late to explain incompatibility. */
export const ProjectCompatibilityBadge = ({ summary }: { summary: ProjectSummary }) => {
  const { t } = useTranslation();

  if (isProjectSummaryCompatible(summary)) {
    return null;
  }

  return (
    <Badge alignSelf="flex-start" colorPalette="orange" variant="surface">
      {t(
        summary.minimumCanvasSchemaVersion < MIN_SUPPORTED_CANVAS_SCHEMA_VERSION
          ? 'projects.legacyFormat'
          : 'projects.requiresNewerInvoke'
      )}
    </Badge>
  );
};