@umituz/react-native-subscription 2.43.17 → 2.43.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-subscription",
3
- "version": "2.43.17",
3
+ "version": "2.43.18",
4
4
  "description": "Complete subscription management with RevenueCat, paywall UI, and credits system for React Native apps",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -95,7 +95,13 @@ const ManagedSubscriptionFlowInner = React.memo<ManagedSubscriptionFlowProps>(({
95
95
  const { isInitialized: isSplashComplete } = useSplashFlow({
96
96
  duration: splash?.duration || 0,
97
97
  });
98
-
98
+
99
+ // Hooks for paywall (called at component level, not inside conditional render)
100
+ const { isPremium, isSyncing, credits } = usePremiumStatus();
101
+ const { packages } = usePremiumPackages();
102
+ const { purchasePackage, restorePurchase } = usePremiumActions();
103
+ const { closePostOnboardingPaywall } = useSubscriptionFlowStore();
104
+
99
105
  const [isNavReady, setIsNavReady] = useState(false);
100
106
 
101
107
  // Mark navigation tree as ready after splash and localization
@@ -187,33 +193,24 @@ const ManagedSubscriptionFlowInner = React.memo<ManagedSubscriptionFlowProps>(({
187
193
  });
188
194
  }
189
195
 
190
- const PostOnboardingPaywall = () => {
191
- const { isPremium, isSyncing, credits } = usePremiumStatus();
192
- const { packages } = usePremiumPackages();
193
- const { purchasePackage, restorePurchase } = usePremiumActions();
194
- const { closePostOnboardingPaywall } = useSubscriptionFlowStore();
195
-
196
- return (
197
- <PaywallScreen
198
- translations={paywall.translations}
199
- legalUrls={paywall.legalUrls}
200
- features={paywall.features}
201
- bestValueIdentifier={paywall.bestValueIdentifier}
202
- creditsLabel={paywall.creditsLabel}
203
- heroImage={paywall.heroImage}
204
- source="onboarding"
205
- packages={packages}
206
- isPremium={isPremium}
207
- credits={credits}
208
- isSyncing={isSyncing}
209
- onPurchase={purchasePackage}
210
- onRestore={restorePurchase}
211
- onClose={closePostOnboardingPaywall}
212
- />
213
- );
214
- };
215
-
216
- return <PostOnboardingPaywall />;
196
+ return (
197
+ <PaywallScreen
198
+ translations={paywall.translations}
199
+ legalUrls={paywall.legalUrls}
200
+ features={paywall.features}
201
+ bestValueIdentifier={paywall.bestValueIdentifier}
202
+ creditsLabel={paywall.creditsLabel}
203
+ heroImage={paywall.heroImage}
204
+ source="onboarding"
205
+ packages={packages}
206
+ isPremium={isPremium}
207
+ credits={credits}
208
+ isSyncing={isSyncing}
209
+ onPurchase={purchasePackage}
210
+ onRestore={restorePurchase}
211
+ onClose={closePostOnboardingPaywall}
212
+ />
213
+ );
217
214
  }
218
215
 
219
216
  // 3. Application Content + Overlays