@umituz/react-native-settings 4.23.103 → 4.23.104

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-settings",
3
- "version": "4.23.103",
3
+ "version": "4.23.104",
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",
@@ -114,23 +114,34 @@ export const useSettingsScreenConfig = (
114
114
  };
115
115
  }
116
116
 
117
+ // Add subscription title and description from translations if available
118
+ if (config.subscription && typeof config.subscription === 'object') {
119
+ config.subscription = {
120
+ ...config.subscription,
121
+ title: translations?.features?.subscription?.title || config.subscription.title || "Subscription",
122
+ description: translations?.features?.subscription?.description || config.subscription.description,
123
+ };
124
+ }
125
+
117
126
  // Add gamification title and description
118
- if ((config.gamification === true || (config.gamification && typeof config.gamification === 'object')) && translations?.features?.gamification) {
119
- const existingConfig = typeof config.gamification === 'object' ? config.gamification : { enabled: true, storageKey: '' };
127
+ if (config.gamification) {
128
+ const existingConfig = typeof config.gamification === 'object' ? config.gamification : { enabled: true };
120
129
  config.gamification = {
121
130
  ...existingConfig,
122
- title: translations.features.gamification.title,
123
- description: translations.features.gamification.description,
131
+ enabled: true,
132
+ title: translations?.features?.gamification?.title || (existingConfig as any).title || "Your Progress",
133
+ description: translations?.features?.gamification?.description || (existingConfig as any).description,
124
134
  };
125
135
  }
126
136
 
127
137
  // Add videoTutorial title and description
128
- if ((config.videoTutorial === true || (config.videoTutorial && typeof config.videoTutorial === 'object')) && translations?.features?.videoTutorial) {
138
+ if (config.videoTutorial) {
129
139
  const existingConfig = typeof config.videoTutorial === 'object' ? config.videoTutorial : { enabled: true };
130
140
  config.videoTutorial = {
131
141
  ...existingConfig,
132
- title: translations.features.videoTutorial.title,
133
- description: translations.features.videoTutorial.description,
142
+ enabled: true,
143
+ title: translations?.features?.videoTutorial?.title || (existingConfig as any).title || "Video Tutorials",
144
+ description: translations?.features?.videoTutorial?.description || (existingConfig as any).description,
134
145
  };
135
146
  }
136
147