@umituz/react-native-settings 4.17.4 → 4.17.6

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.17.4",
3
+ "version": "4.17.6",
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",
@@ -144,18 +144,20 @@ export const SettingsContent: React.FC<SettingsContentProps> = ({
144
144
  ]}
145
145
  showsVerticalScrollIndicator={false}
146
146
  >
147
- {showUserProfile && userProfile && (
147
+ {showUserProfile && (
148
148
  <View style={styles.profileContainer}>
149
149
  <ProfileSection
150
150
  profile={{
151
- displayName: userProfile.displayName || (userProfile.isAnonymous ? t("settings.profile.anonymousName") : t("settings.profile.defaultUserName")),
152
- userId: userProfile.userId,
153
- isAnonymous: userProfile.isAnonymous || false,
154
- avatarUrl: userProfile.avatarUrl,
155
- accountSettingsRoute: userProfile.accountSettingsRoute,
151
+ displayName: userProfile?.displayName || t("settings.profile.anonymousName") || "",
152
+ userId: userProfile?.userId,
153
+ isAnonymous: userProfile?.isAnonymous ?? true,
154
+ avatarUrl: userProfile?.avatarUrl,
155
+ accountSettingsRoute: userProfile?.accountSettingsRoute,
156
156
  }}
157
- onPress={userProfile.onPress}
158
- onSignIn={userProfile.onPress}
157
+ onPress={userProfile?.onPress}
158
+ onSignIn={userProfile?.onPress}
159
+ signInText={t("auth.signIn") || ""}
160
+ anonymousText={t("settings.profile.anonymousName") || ""}
159
161
  />
160
162
  </View>
161
163
  )}