@umituz/react-native-subscription 2.40.20 → 2.40.22

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.40.20",
3
+ "version": "2.40.22",
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",
@@ -7,15 +7,15 @@ import { usePaywallOrchestrator } from "../../../paywall/hooks/usePaywallOrchest
7
7
  import { PaywallFeedbackScreen } from "../../../subscription/presentation/components/feedback/PaywallFeedbackScreen";
8
8
  import { PaywallFeedbackTranslations } from "../../../subscription/presentation/components/feedback/PaywallFeedbackScreen.types";
9
9
  import { PaywallTranslations, PaywallLegalUrls, SubscriptionFeature } from "../../../paywall/entities/types";
10
- import { usePaywallFeedbackSubmit } from "../../../../presentation/hooks/feedback/useFeedbackSubmit.ts";
10
+ import { usePaywallFeedbackSubmit } from "../../../../presentation/hooks/feedback/useFeedbackSubmit";
11
11
 
12
12
  export interface ManagedSubscriptionFlowProps {
13
13
  children: React.ReactNode;
14
14
  navigation: any;
15
15
  islocalizationReady: boolean;
16
-
16
+
17
17
  // Splash Configuration
18
- splash: {
18
+ splash?: {
19
19
  appName: string;
20
20
  tagline: string;
21
21
  duration?: number;
@@ -81,8 +81,8 @@ export const ManagedSubscriptionFlow: React.FC<ManagedSubscriptionFlowProps> = (
81
81
  offline,
82
82
  }) => {
83
83
  const tokens = useAppDesignTokens();
84
- const { isInitialized: isSplashComplete } = useSplashFlow({
85
- duration: splash.duration || 1500
84
+ const { isInitialized: isSplashComplete } = useSplashFlow({
85
+ duration: splash?.duration || 0,
86
86
  });
87
87
 
88
88
  const [isNavReady, setIsNavReady] = useState(false);
@@ -124,7 +124,7 @@ export const ManagedSubscriptionFlow: React.FC<ManagedSubscriptionFlowProps> = (
124
124
  };
125
125
 
126
126
  // 1. Loading / Splash State
127
- if (!isSplashComplete || !flowState.isInitialized || !islocalizationReady) {
127
+ if (splash && (!isSplashComplete || !flowState.isInitialized || !islocalizationReady)) {
128
128
  return (
129
129
  <SplashScreen
130
130
  appName={splash.appName}
@@ -134,6 +134,11 @@ export const ManagedSubscriptionFlow: React.FC<ManagedSubscriptionFlowProps> = (
134
134
  );
135
135
  }
136
136
 
137
+ // If no splash and not ready, show minimal loading
138
+ if (!splash && (!flowState.isInitialized || !islocalizationReady)) {
139
+ return null;
140
+ }
141
+
137
142
  // 2. Onboarding State
138
143
  if (!flowState.isOnboardingComplete) {
139
144
  return (