The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
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;