@umituz/react-native-settings 4.16.18 → 4.16.19

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.16.18",
3
+ "version": "4.16.19",
4
4
  "description": "Settings management for React Native apps - user preferences, theme, language, notifications",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -7,6 +7,7 @@ import React, { Component, ReactNode } from 'react';
7
7
  import { View, StyleSheet } from 'react-native';
8
8
  import { useAppDesignTokens } from '@umituz/react-native-design-system';
9
9
  import { AtomicText, AtomicIcon } from '@umituz/react-native-design-system';
10
+ import { useLocalization } from '@umituz/react-native-localization';
10
11
 
11
12
  interface Props {
12
13
  children: ReactNode;
@@ -63,15 +64,19 @@ interface ErrorBoundaryFallbackProps {
63
64
 
64
65
  const ErrorBoundaryFallback: React.FC<ErrorBoundaryFallbackProps> = ({
65
66
  error,
66
- fallbackTitle = "error_boundary.title",
67
- fallbackMessage = "error_boundary.message"
67
+ fallbackTitle,
68
+ fallbackMessage
68
69
  }) => {
69
70
  const tokens = useAppDesignTokens();
71
+ const { t } = useLocalization();
72
+
73
+ const title = __DEV__ && error?.message
74
+ ? t("error_boundary.dev_title")
75
+ : (fallbackTitle || t("error_boundary.title"));
70
76
 
71
- const title = __DEV__ && error?.message ? "error_boundary.dev_title" : fallbackTitle;
72
77
  const message = __DEV__ && error?.message
73
- ? `error_boundary.dev_message: ${error.message}`
74
- : fallbackMessage;
78
+ ? `${t("error_boundary.dev_message")}: ${error.message}`
79
+ : (fallbackMessage || t("error_boundary.message"));
75
80
 
76
81
  return (
77
82
  <View style={[styles.container, { backgroundColor: tokens.colors.backgroundPrimary }]}>