Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

546 B
Raw Blame
import type { IntegrationState } from "@/components/project/integrations/get-integration-status";

export function integrationTriggerLabel(
  state: IntegrationState,
  open: boolean,
) {
  const isSetUp = state === "connected" || state === "paused";
  if (open)
    return state === "disconnected"
      ? "common:actions.cancel"
      : "settings:projectIntegrations.done";
  if (state === "loading") return "common:empty.loading";
  return isSetUp
    ? "settings:projectIntegrations.configure"
    : "settings:projectIntegrations.connect";
}