mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-14 00:46:39 +00:00
♻️some refactor
This commit is contained in:
@@ -7,12 +7,13 @@ export function usePaidStatus() {
|
||||
const subscription = useSubscriptionStatusContext();
|
||||
|
||||
// Check if features are disabled due to licensing/subscription
|
||||
const isEnterpriseLicensed = build === "enterprise" && isUnlocked();
|
||||
const isSaasSubscribed = build === "saas" && subscription?.isSubscribed();
|
||||
const hasEnterpriseLicense = build === "enterprise" && isUnlocked();
|
||||
const hasSaasSubscription =
|
||||
build === "saas" && subscription?.isSubscribed();
|
||||
|
||||
return {
|
||||
isEnterpriseLicensed,
|
||||
isSaasSubscribed,
|
||||
isPaidUser: isEnterpriseLicensed || isSaasSubscribed
|
||||
hasEnterpriseLicense,
|
||||
hasSaasSubscription,
|
||||
isPaidUser: hasEnterpriseLicense || hasSaasSubscription
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user