@umituz/react-native-settings 5.1.2 → 5.1.4
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": "5.1.
|
|
3
|
+
"version": "5.1.4",
|
|
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",
|
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
createLegalScreenProps,
|
|
19
19
|
} from "./utils";
|
|
20
20
|
import type { SettingsStackParamList, SettingsStackNavigatorProps } from "./types";
|
|
21
|
+
import { useAuthHandlers } from "../utils/useAuthHandlers";
|
|
21
22
|
|
|
22
23
|
export const SettingsStackNavigator: React.FC<SettingsStackNavigatorProps> = (props) => {
|
|
23
24
|
const {
|
|
@@ -31,6 +32,8 @@ export const SettingsStackNavigator: React.FC<SettingsStackNavigatorProps> = (pr
|
|
|
31
32
|
const { handlePrivacyPress, handleTermsPress, handleEulaPress, aboutConfig } =
|
|
32
33
|
useNavigationHandlers(appInfo, legalUrls, aboutTranslations);
|
|
33
34
|
|
|
35
|
+
const { PasswordPromptComponent } = useAuthHandlers(appInfo, config?.translations?.errors);
|
|
36
|
+
|
|
34
37
|
const screenOptions = React.useMemo(
|
|
35
38
|
() => ({
|
|
36
39
|
headerShown: false,
|
|
@@ -60,8 +63,11 @@ export const SettingsStackNavigator: React.FC<SettingsStackNavigatorProps> = (pr
|
|
|
60
63
|
};
|
|
61
64
|
|
|
62
65
|
return (
|
|
63
|
-
|
|
64
|
-
<
|
|
65
|
-
|
|
66
|
+
<>
|
|
67
|
+
<View style={{ flex: 1 }}>
|
|
68
|
+
<StackNavigator<SettingsStackParamList> config={navigatorConfig} />
|
|
69
|
+
</View>
|
|
70
|
+
{PasswordPromptComponent}
|
|
71
|
+
</>
|
|
66
72
|
);
|
|
67
73
|
};
|
|
@@ -71,15 +71,16 @@ export const useAuthHandlers = (appInfo: AppInfo, translations?: SettingsTransla
|
|
|
71
71
|
}, [signOut, translations]);
|
|
72
72
|
|
|
73
73
|
const handleDeleteAccount = useCallback(async () => {
|
|
74
|
+
console.log("[useAuthHandlers] handleDeleteAccount called");
|
|
74
75
|
try {
|
|
76
|
+
console.log("[useAuthHandlers] Calling deleteAccountFromAuth...");
|
|
75
77
|
await deleteAccountFromAuth();
|
|
78
|
+
console.log("[useAuthHandlers] Delete account successful");
|
|
76
79
|
// Account deleted successfully - auth package handles everything
|
|
77
80
|
} catch (error) {
|
|
78
81
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
79
82
|
|
|
80
|
-
|
|
81
|
-
console.error("[useAuthHandlers] Delete account failed:", error);
|
|
82
|
-
}
|
|
83
|
+
console.error("[useAuthHandlers] Delete account failed:", error);
|
|
83
84
|
|
|
84
85
|
AlertService.createErrorAlert(
|
|
85
86
|
translations?.common || "Error",
|