@umituz/react-native-settings 4.20.39 → 4.20.41

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.20.39",
3
+ "version": "4.20.41",
4
4
  "description": "Complete settings hub for React Native apps - consolidated package with settings, about, legal, appearance, feedback, FAQs, and rating",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -127,7 +127,7 @@ export const SettingsStackNavigator: React.FC<SettingsStackNavigatorProps> = ({
127
127
  return (
128
128
  <Stack.Navigator screenOptions={screenOptions}>
129
129
  <Stack.Screen
130
- name="Settings"
130
+ name="SettingsMain"
131
131
  component={SettingsScreenWrapper}
132
132
  options={{ headerShown: false }}
133
133
  />
@@ -35,7 +35,7 @@ export interface LegalUrls {
35
35
  * Navigation param list
36
36
  */
37
37
  export type SettingsStackParamList = {
38
- Settings: undefined;
38
+ SettingsMain: undefined;
39
39
  Appearance: undefined;
40
40
  About: undefined;
41
41
  Legal: undefined;
@@ -1,7 +1,7 @@
1
- import React from "react";
1
+ import React, { useCallback } from "react";
2
+ import { useNavigation } from "@react-navigation/native";
2
3
  import { useLocalization } from "@umituz/react-native-localization";
3
4
  import { SupportSection } from "../../../../domains/feedback/presentation/components/SupportSection";
4
- import { FAQSection } from "../../../../domains/faqs/presentation/components/FAQSection";
5
5
  import { SettingsSection } from "../../../components/SettingsSection";
6
6
  import { SettingsItemCard } from "../../../components/SettingsItemCard";
7
7
 
@@ -15,6 +15,11 @@ export const SupportSettingsSection: React.FC<SupportSettingsSectionProps> = ({
15
15
  normalizedConfig,
16
16
  }) => {
17
17
  const { t } = useLocalization();
18
+ const navigation = useNavigation();
19
+
20
+ const handleFAQPress = useCallback(() => {
21
+ navigation.navigate("FAQ" as never);
22
+ }, [navigation]);
18
23
 
19
24
  if (!(features.feedback || features.rating || features.faqs)) return null;
20
25
 
@@ -68,15 +73,11 @@ export const SupportSettingsSection: React.FC<SupportSettingsSectionProps> = ({
68
73
  )}
69
74
 
70
75
  {features.faqs && (
71
- <FAQSection
72
- renderSection={(props: any) => <>{props.children}</>}
73
- renderItem={(props: any) => <SettingsItemCard title={props.title} icon={props.icon} onPress={props.onPress} />}
74
- config={{
75
- enabled: features.faqs,
76
- ...normalizedConfig.faqs.config,
77
- title: normalizedConfig.faqs.config?.title || t("settings.faqs.title"),
78
- description: normalizedConfig.faqs.config?.description || t("settings.faqs.description"),
79
- }}
76
+ <SettingsItemCard
77
+ title={normalizedConfig.faqs.config?.title || t("settings.faqs.title")}
78
+ description={normalizedConfig.faqs.config?.description || t("settings.faqs.description")}
79
+ icon="help-circle-outline"
80
+ onPress={handleFAQPress}
80
81
  />
81
82
  )}
82
83
  </SettingsSection>