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.

385 B
Raw Blame
const BILLABLE_STATUSES = new Set(["active", "trialing", "past_due"]);

export type SubscriptionState = {
  creemSubscriptionId: string | null;
  status: string | null;
};

export function hasBillableSubscription(
  billing: SubscriptionState | null | undefined,
) {
  if (!billing?.creemSubscriptionId) {
    return false;
  }

  return BILLABLE_STATUSES.has(billing.status ?? "");
}