@umituz/react-native-subscription 2.2.0 → 2.2.2

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.2.0",
3
+ "version": "2.2.2",
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",
@@ -58,4 +58,4 @@
58
58
  "README.md",
59
59
  "LICENSE"
60
60
  ]
61
- }
61
+ }
@@ -17,16 +17,11 @@ export const PaywallFeatureItem: React.FC<PaywallFeatureItemProps> = React.memo(
17
17
  ({ icon, text }) => {
18
18
  const tokens = useAppDesignTokens();
19
19
 
20
- // Icon name should already be PascalCase (e.g., "Sparkles", "Image", "Wand")
21
- // If not, convert first letter to uppercase
20
+ // Pass icon name directly to AtomicIcon (which uses Ionicons)
21
+ // Do NOT capitalize, as Ionicons names are lowercase/kebab-case.
22
22
  const iconName = useMemo(() => {
23
- if (!icon) return "Circle";
24
- // If already PascalCase, return as is
25
- if (/^[A-Z]/.test(icon)) {
26
- return icon;
27
- }
28
- // Convert first letter to uppercase
29
- return icon.charAt(0).toUpperCase() + icon.slice(1);
23
+ if (!icon) return "help-circle-outline";
24
+ return icon;
30
25
  }, [icon]);
31
26
 
32
27
  return (
@@ -125,7 +125,12 @@ export const useInitializeCredits = ({
125
125
  },
126
126
  onSuccess: (result) => {
127
127
  if (userId && result.success && result.data) {
128
+ // Set the data immediately for optimistic UI
128
129
  queryClient.setQueryData(creditsQueryKeys.user(userId), result.data);
130
+ // Also invalidate to ensure all subscribers get the update
131
+ queryClient.invalidateQueries({
132
+ queryKey: creditsQueryKeys.user(userId),
133
+ });
129
134
  }
130
135
  },
131
136
  });