@umituz/react-native-settings 4.23.49 → 4.23.51

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.49",
3
+ "version": "4.23.51",
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",
@@ -48,7 +48,7 @@
48
48
  "@react-navigation/native": ">=6.0.0",
49
49
  "@react-navigation/stack": ">=6.0.0",
50
50
  "@tanstack/react-query": ">=5.0.0",
51
- "@umituz/react-native-design-system": ">=4.23.49",
51
+ "@umituz/react-native-design-system": "*",
52
52
  "expo-device": ">=6.0.0",
53
53
  "expo-haptics": ">=15.0.0",
54
54
  "expo-localization": ">=16.0.0",
@@ -77,7 +77,7 @@
77
77
  "@typescript-eslint/eslint-plugin": "^7.18.0",
78
78
  "@typescript-eslint/parser": "^7.18.0",
79
79
  "@umituz/react-native-auth": "^3.6.49",
80
- "@umituz/react-native-design-system": "^4.23.49",
80
+ "@umituz/react-native-design-system": "^4.23.50",
81
81
  "@umituz/react-native-firebase": "^1.13.102",
82
82
  "@umituz/react-native-sentry": "*",
83
83
  "eslint": "^8.57.0",
@@ -81,12 +81,6 @@ export const CustomColorsSection: React.FC<CustomColorsSectionProps> = ({
81
81
  // Memoize styles to prevent unnecessary re-creation
82
82
  const styles = useMemo(() => getStyles(tokens), [tokens]);
83
83
 
84
- // Memoize hasCustomColors check to prevent unnecessary re-renders
85
- const hasCustomColors = useMemo(() =>
86
- Object.keys(localCustomColors).length > 0,
87
- [localCustomColors]
88
- );
89
-
90
84
  // Memoize color fields to prevent unnecessary re-renders
91
85
  const colorFieldsMemo = useMemo(() => colorFields, [colorFields]);
92
86
 
@@ -123,14 +117,14 @@ export const CustomColorsSection: React.FC<CustomColorsSectionProps> = ({
123
117
 
124
118
  // Memoize reset button to prevent unnecessary re-renders
125
119
  const resetButton = useMemo(() => {
126
- if (!showResetButton || !hasCustomColors) return null;
127
-
120
+ if (!showResetButton) return null;
121
+
128
122
  return (
129
123
  <AtomicButton variant="outline" size="sm" onPress={handleResetColors}>
130
- {resetButtonText}
124
+ {resetButtonText || "Reset"}
131
125
  </AtomicButton>
132
126
  );
133
- }, [showResetButton, hasCustomColors, resetButtonText, handleResetColors]);
127
+ }, [showResetButton, resetButtonText, handleResetColors]);
134
128
 
135
129
  return (
136
130
  <View style={styles.section}>