Skip to content

The open alternative to Salesforce, designed for AI.

354 B
Raw Blame
import { type CurrentWorkspace } from '@/auth/states/currentWorkspaceState';

export const getIsPlanRequired = ({
  isBillingEnabled,
  currentWorkspace,
}: {
  isBillingEnabled: boolean;
  currentWorkspace: Pick<CurrentWorkspace, 'billingSubscriptions'> | null;
}) =>
  isBillingEnabled &&
  (currentWorkspace?.billingSubscriptions?.length ?? 0) === 0;