@umituz/react-native-settings 4.23.104 → 4.23.106
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 +1 -1
- package/src/domains/gamification/components/GamificationScreen/StatsGrid.tsx +2 -2
- package/src/domains/rating/presentation/components/StarRating.tsx +1 -1
- package/src/presentation/hooks/useSettingsScreenConfig.ts +3 -2
- package/src/presentation/screens/components/SettingsContent.tsx +5 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-settings",
|
|
3
|
-
"version": "4.23.
|
|
3
|
+
"version": "4.23.106",
|
|
4
4
|
"description": "Complete settings hub for React Native apps - consolidated package with settings, localization, about, legal, appearance, feedback, FAQs, rating, and gamification",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -36,9 +36,9 @@ export const StatsGrid: React.FC<StatsGridProps> = ({
|
|
|
36
36
|
{statsTitle}
|
|
37
37
|
</AtomicText>
|
|
38
38
|
<View style={styles.statsGrid}>
|
|
39
|
-
{stats.map((stat
|
|
39
|
+
{stats.map((stat) => (
|
|
40
40
|
<StatsCard
|
|
41
|
-
key={
|
|
41
|
+
key={`${stat.label}-${stat.value}`}
|
|
42
42
|
{...stat}
|
|
43
43
|
accentColor={accentColor}
|
|
44
44
|
backgroundColor={cardBackgroundColor}
|
|
@@ -44,7 +44,7 @@ export const StarRating: React.FC<StarRatingProps> = ({
|
|
|
44
44
|
<View style={[styles.container, style]}>
|
|
45
45
|
{Array.from({ length: maxRating }).map((_, index) => (
|
|
46
46
|
<TouchableOpacity
|
|
47
|
-
key={index}
|
|
47
|
+
key={`star-${index}`}
|
|
48
48
|
onPress={() => handlePress(index)}
|
|
49
49
|
disabled={disabled}
|
|
50
50
|
activeOpacity={0.7}
|
|
@@ -118,6 +118,7 @@ export const useSettingsScreenConfig = (
|
|
|
118
118
|
if (config.subscription && typeof config.subscription === 'object') {
|
|
119
119
|
config.subscription = {
|
|
120
120
|
...config.subscription,
|
|
121
|
+
enabled: true,
|
|
121
122
|
title: translations?.features?.subscription?.title || config.subscription.title || "Subscription",
|
|
122
123
|
description: translations?.features?.subscription?.description || config.subscription.description,
|
|
123
124
|
};
|
|
@@ -127,7 +128,7 @@ export const useSettingsScreenConfig = (
|
|
|
127
128
|
if (config.gamification) {
|
|
128
129
|
const existingConfig = typeof config.gamification === 'object' ? config.gamification : { enabled: true };
|
|
129
130
|
config.gamification = {
|
|
130
|
-
...existingConfig,
|
|
131
|
+
...(existingConfig as any),
|
|
131
132
|
enabled: true,
|
|
132
133
|
title: translations?.features?.gamification?.title || (existingConfig as any).title || "Your Progress",
|
|
133
134
|
description: translations?.features?.gamification?.description || (existingConfig as any).description,
|
|
@@ -138,7 +139,7 @@ export const useSettingsScreenConfig = (
|
|
|
138
139
|
if (config.videoTutorial) {
|
|
139
140
|
const existingConfig = typeof config.videoTutorial === 'object' ? config.videoTutorial : { enabled: true };
|
|
140
141
|
config.videoTutorial = {
|
|
141
|
-
...existingConfig,
|
|
142
|
+
...(existingConfig as any),
|
|
142
143
|
enabled: true,
|
|
143
144
|
title: translations?.features?.videoTutorial?.title || (existingConfig as any).title || "Video Tutorials",
|
|
144
145
|
description: translations?.features?.videoTutorial?.description || (existingConfig as any).description,
|
|
@@ -117,9 +117,11 @@ export const SettingsContent: React.FC<SettingsContentProps> = ({
|
|
|
117
117
|
<CustomSettingsList customSections={customSections} />
|
|
118
118
|
|
|
119
119
|
{features.subscription && (normalizedConfig.subscription.config?.route || normalizedConfig.subscription.config?.onPress) && (
|
|
120
|
-
<
|
|
121
|
-
|
|
122
|
-
|
|
120
|
+
<SettingsSection title={translations?.sections?.subscription}>
|
|
121
|
+
<SubscriptionSettingsItem
|
|
122
|
+
config={normalizedConfig.subscription.config}
|
|
123
|
+
/>
|
|
124
|
+
</SettingsSection>
|
|
123
125
|
)}
|
|
124
126
|
|
|
125
127
|
{features.wallet && normalizedConfig.wallet.config?.route && (
|