@umituz/react-native-subscription 2.37.75 → 2.37.76
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.37.
|
|
3
|
+
"version": "2.37.76",
|
|
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",
|
|
@@ -83,7 +83,7 @@ export const SubscriptionDetailScreen: React.FC<SubscriptionDetailScreenProps> =
|
|
|
83
83
|
onUpgrade={config.upgradePrompt.onUpgrade ?? (() => {})}
|
|
84
84
|
/>
|
|
85
85
|
)}
|
|
86
|
-
{IS_DEV && <DevTestPanel />}
|
|
86
|
+
{IS_DEV && <DevTestPanel statusType={config.statusType} />}
|
|
87
87
|
</View>
|
|
88
88
|
</ScreenLayout>
|
|
89
89
|
);
|
|
@@ -91,8 +91,9 @@ export const SubscriptionDetailScreen: React.FC<SubscriptionDetailScreenProps> =
|
|
|
91
91
|
|
|
92
92
|
/* ─── DEV TEST PANEL ─── Only rendered in __DEV__ ─── */
|
|
93
93
|
|
|
94
|
-
const DevTestPanel: React.FC = () => {
|
|
94
|
+
const DevTestPanel: React.FC<{ statusType: string }> = ({ statusType }) => {
|
|
95
95
|
const [loading, setLoading] = useState<string | null>(null);
|
|
96
|
+
const isPremium = statusType === "active";
|
|
96
97
|
|
|
97
98
|
const run = useCallback(async (label: string, fn: () => Promise<void>) => {
|
|
98
99
|
if (loading) return;
|
|
@@ -126,8 +127,8 @@ const DevTestPanel: React.FC = () => {
|
|
|
126
127
|
DEV TEST PANEL
|
|
127
128
|
</AtomicText>
|
|
128
129
|
<View style={{ gap: 8 }}>
|
|
129
|
-
<DevButton label="Cancel" color="#e94560" loading={loading} onPress={handleCancel} />
|
|
130
|
-
<DevButton label="Restore" color="#0f3460" loading={loading} onPress={handleRestore} />
|
|
130
|
+
{isPremium && <DevButton label="Cancel" color="#e94560" loading={loading} onPress={handleCancel} />}
|
|
131
|
+
{!isPremium && <DevButton label="Restore" color="#0f3460" loading={loading} onPress={handleRestore} />}
|
|
131
132
|
</View>
|
|
132
133
|
</View>
|
|
133
134
|
);
|