first
This commit is contained in:
commit
8538ab969a
434 changed files with 44051 additions and 0 deletions
16
apps/web/modules/saas/payments/lib/purchases-context.ts
Normal file
16
apps/web/modules/saas/payments/lib/purchases-context.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import type { PlanId } from "@saas/payments/types";
|
||||
import React from "react";
|
||||
|
||||
export const PurchasesContext = React.createContext<
|
||||
| {
|
||||
activeSubscription: {
|
||||
id: string;
|
||||
purchaseId?: string;
|
||||
} | null;
|
||||
loaded: boolean;
|
||||
hasSubscription: (planIds?: PlanId[] | PlanId) => boolean;
|
||||
refetchPurchases: () => Promise<void>;
|
||||
hasPurchase: (planId: PlanId) => boolean;
|
||||
}
|
||||
| undefined
|
||||
>(undefined);
|
||||
Loading…
Add table
Add a link
Reference in a new issue