@umituz/react-native-settings 4.16.15 → 4.16.16

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.15",
3
+ "version": "4.16.16",
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",
@@ -18,11 +18,22 @@ import { LegalSection } from "@umituz/react-native-legal";
18
18
  import { AppearanceSection } from "@umituz/react-native-appearance";
19
19
  import { LanguageSection } from "@umituz/react-native-localization";
20
20
  import { SupportSection } from "@umituz/react-native-feedback";
21
- import { FAQSection } from "@umituz/react-native-faqs";
22
21
  import { SettingItem } from "../../components/SettingItem";
23
22
  import type { NormalizedConfig } from "../utils/normalizeConfig";
24
23
  import type { CustomSettingsSection } from "../types";
25
24
 
25
+ // Optional FAQ component
26
+ let FAQSection: React.ComponentType<any> | null = null;
27
+ try {
28
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
29
+ const module = require("@umituz/react-native-faqs");
30
+ if (module?.FAQSection) {
31
+ FAQSection = module.FAQSection;
32
+ }
33
+ } catch {
34
+ // Package not available
35
+ }
36
+
26
37
  // Optional disclaimer component
27
38
  let DisclaimerSetting: React.ComponentType<any> | null = null;
28
39
  try {
@@ -253,7 +264,7 @@ export const SettingsContent: React.FC<SettingsContentProps> = ({
253
264
  />
254
265
  )}
255
266
 
256
- {features.faqs && (
267
+ {features.faqs && FAQSection && (
257
268
  <FAQSection
258
269
  renderSection={(props: any) => <SettingsSection {...props} />}
259
270
  renderItem={(props: any) => <SettingItem {...props} />}