@umituz/react-native-settings 4.23.8 → 4.23.9

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.8",
3
+ "version": "4.23.9",
4
4
  "description": "Complete settings hub for React Native apps - consolidated package with settings, about, legal, appearance, feedback, FAQs, rating, and gamification",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -5,7 +5,7 @@
5
5
  */
6
6
 
7
7
  import React from "react";
8
- import { useAppDesignTokens, AppNavigation } from "@umituz/react-native-design-system";
8
+ import { useAppDesignTokens, useAppNavigation } from "@umituz/react-native-design-system";
9
9
  import { SettingsItemCard } from "../../../../presentation/components/SettingsItemCard";
10
10
  import type { EnvConfig } from "../../types";
11
11
 
@@ -18,6 +18,8 @@ export interface EnvViewerSettingProps {
18
18
  description?: string;
19
19
  /** Screen name to navigate to */
20
20
  screenName: string;
21
+ /** Custom navigation handler (overrides route) */
22
+ onPress?: () => void;
21
23
  }
22
24
 
23
25
  export const EnvViewerSetting: React.FC<EnvViewerSettingProps> = ({
@@ -27,9 +29,14 @@ export const EnvViewerSetting: React.FC<EnvViewerSettingProps> = ({
27
29
  screenName,
28
30
  }) => {
29
31
  const tokens = useAppDesignTokens();
32
+ const navigation = useAppNavigation();
30
33
 
31
34
  const handlePress = () => {
32
- AppNavigation.navigate(screenName as never, { config } as never);
35
+ if (onPress) {
36
+ onPress();
37
+ } else {
38
+ navigation.navigate(screenName as any, { config } as any);
39
+ }
33
40
  };
34
41
 
35
42
  return (
@@ -12,7 +12,7 @@ import {
12
12
  AtomicTouchable,
13
13
  useAppDesignTokens,
14
14
  useSafeAreaInsets,
15
- AppNavigation,
15
+ useAppNavigation,
16
16
  AlertService,
17
17
  NavigationHeader,
18
18
  } from "@umituz/react-native-design-system";
@@ -27,6 +27,7 @@ export interface EnvViewerScreenProps {
27
27
  export const EnvViewerScreen: React.FC<EnvViewerScreenProps> = ({ config }) => {
28
28
  const tokens = useAppDesignTokens();
29
29
  const { bottom } = useSafeAreaInsets();
30
+ const navigation = useAppNavigation();
30
31
  const [revealedKeys, setRevealedKeys] = useState<Set<string>>(new Set());
31
32
 
32
33
  const toggleReveal = (key: string) => {
@@ -95,7 +96,7 @@ export const EnvViewerScreen: React.FC<EnvViewerScreenProps> = ({ config }) => {
95
96
 
96
97
  return (
97
98
  <View style={[styles.container, { backgroundColor: tokens.colors.backgroundPrimary }]}>
98
- <NavigationHeader title="Environment Variables" onBackPress={() => AppNavigation.goBack()} />
99
+ <NavigationHeader title="Environment Variables" onBackPress={() => navigation.goBack()} />
99
100
 
100
101
  <ScrollView
101
102
  showsVerticalScrollIndicator={false}