@umituz/react-native-settings 4.23.103 → 4.23.105

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.105",
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,35 @@ 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
+ enabled: true,
122
+ title: translations?.features?.subscription?.title || config.subscription.title || "Subscription",
123
+ description: translations?.features?.subscription?.description || config.subscription.description,
124
+ };
125
+ }
126
+
117
127
  // 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: '' };
128
+ if (config.gamification) {
129
+ const existingConfig = typeof config.gamification === 'object' ? config.gamification : { enabled: true };
120
130
  config.gamification = {
121
- ...existingConfig,
122
- title: translations.features.gamification.title,
123
- description: translations.features.gamification.description,
131
+ ...(existingConfig as any),
132
+ enabled: true,
133
+ title: translations?.features?.gamification?.title || (existingConfig as any).title || "Your Progress",
134
+ description: translations?.features?.gamification?.description || (existingConfig as any).description,
124
135
  };
125
136
  }
126
137
 
127
138
  // Add videoTutorial title and description
128
- if ((config.videoTutorial === true || (config.videoTutorial && typeof config.videoTutorial === 'object')) && translations?.features?.videoTutorial) {
139
+ if (config.videoTutorial) {
129
140
  const existingConfig = typeof config.videoTutorial === 'object' ? config.videoTutorial : { enabled: true };
130
141
  config.videoTutorial = {
131
- ...existingConfig,
132
- title: translations.features.videoTutorial.title,
133
- description: translations.features.videoTutorial.description,
142
+ ...(existingConfig as any),
143
+ enabled: true,
144
+ title: translations?.features?.videoTutorial?.title || (existingConfig as any).title || "Video Tutorials",
145
+ description: translations?.features?.videoTutorial?.description || (existingConfig as any).description,
134
146
  };
135
147
  }
136
148
 
@@ -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
- <SubscriptionSettingsItem
121
- config={normalizedConfig.subscription.config}
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 && (