@umituz/react-native-subscription 2.10.12 → 2.10.14
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.10.
|
|
3
|
+
"version": "2.10.14",
|
|
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",
|
|
@@ -34,6 +34,10 @@ export interface SubscriptionModalProps {
|
|
|
34
34
|
privacyText?: string;
|
|
35
35
|
termsOfServiceText?: string;
|
|
36
36
|
showRestoreButton?: boolean;
|
|
37
|
+
/** Optional: Map of product identifier to credit amount */
|
|
38
|
+
creditAmounts?: Record<string, number>;
|
|
39
|
+
/** Optional: Manually specify which package should show "Best Value" badge */
|
|
40
|
+
bestValueIdentifier?: string;
|
|
37
41
|
}
|
|
38
42
|
|
|
39
43
|
export const SubscriptionModal: React.FC<SubscriptionModalProps> = React.memo((props) => {
|
|
@@ -57,6 +61,8 @@ export const SubscriptionModal: React.FC<SubscriptionModalProps> = React.memo((p
|
|
|
57
61
|
privacyText,
|
|
58
62
|
termsOfServiceText,
|
|
59
63
|
showRestoreButton = true,
|
|
64
|
+
creditAmounts,
|
|
65
|
+
bestValueIdentifier,
|
|
60
66
|
} = props;
|
|
61
67
|
|
|
62
68
|
const tokens = useAppDesignTokens();
|
|
@@ -111,6 +117,8 @@ export const SubscriptionModal: React.FC<SubscriptionModalProps> = React.memo((p
|
|
|
111
117
|
onSelect={setSelectedPkg}
|
|
112
118
|
loadingText={loadingText}
|
|
113
119
|
emptyText={emptyText}
|
|
120
|
+
creditAmounts={creditAmounts}
|
|
121
|
+
bestValueIdentifier={bestValueIdentifier}
|
|
114
122
|
/>
|
|
115
123
|
|
|
116
124
|
{features.length > 0 && (
|
|
@@ -40,6 +40,12 @@ export const SubscriptionPlanCard: React.FC<SubscriptionPlanCardProps> =
|
|
|
40
40
|
|
|
41
41
|
const title = pkg.product.title || t(`paywall.period.${periodLabel}`);
|
|
42
42
|
|
|
43
|
+
// Debug: Log product identifier and credit amount
|
|
44
|
+
if (__DEV__ && creditAmount) {
|
|
45
|
+
console.log("[SubscriptionPlanCard] Product:", pkg.product.identifier, "Credits:", creditAmount);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
43
49
|
const CardComponent = isSelected ? LinearGradient : View;
|
|
44
50
|
const cardProps = isSelected
|
|
45
51
|
? {
|