Harte Paywall
This commit is contained in:
@@ -60,6 +60,7 @@ function RootLayoutInner() {
|
||||
signOut,
|
||||
session,
|
||||
billingSummary,
|
||||
isActivatingEntitlement,
|
||||
isInitializing,
|
||||
isLoadingPlants,
|
||||
isLoadingBilling,
|
||||
@@ -155,13 +156,15 @@ function RootLayoutInner() {
|
||||
}, [signOut]);
|
||||
|
||||
const isAppReady = installCheckDone && !isInitializing && !isLoadingPlants;
|
||||
const hasActiveEntitlement = billingSummary?.entitlement?.plan === 'pro'
|
||||
&& billingSummary?.entitlement?.status === 'active';
|
||||
const hasActiveEntitlement = isActivatingEntitlement
|
||||
|| (billingSummary?.entitlement?.plan === 'pro'
|
||||
&& billingSummary?.entitlement?.status === 'active');
|
||||
const isAllowedWithoutSession = pathname.includes('onboarding')
|
||||
|| pathname.includes('auth/')
|
||||
|| pathname.includes('scanner')
|
||||
|| pathname.includes('profile/billing');
|
||||
const isAllowedWithoutEntitlement = pathname.includes('auth/')
|
||||
|| pathname.includes('onboarding')
|
||||
|| pathname.includes('scanner')
|
||||
|| pathname.includes('profile/billing');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user