@oxyhq/services 5.4.3 → 5.4.5

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.
Files changed (233) hide show
  1. package/README.md +14 -0
  2. package/lib/commonjs/assets/assets/illustrations/HighFive.tsx +41 -0
  3. package/lib/commonjs/assets/icons/OxyServices.js +1 -1
  4. package/lib/commonjs/assets/illustrations/HighFive.js +61 -0
  5. package/lib/commonjs/assets/illustrations/HighFive.js.map +1 -0
  6. package/lib/commonjs/core/index.js +24 -5
  7. package/lib/commonjs/core/index.js.map +1 -1
  8. package/lib/commonjs/index.js +72 -23
  9. package/lib/commonjs/index.js.map +1 -1
  10. package/lib/commonjs/node/createAuth.js +95 -0
  11. package/lib/commonjs/node/createAuth.js.map +1 -0
  12. package/lib/commonjs/node/index.js +15 -6
  13. package/lib/commonjs/node/index.js.map +1 -1
  14. package/lib/commonjs/package.json +1 -0
  15. package/lib/commonjs/ui/components/Avatar.js +3 -3
  16. package/lib/commonjs/ui/components/Avatar.js.map +1 -1
  17. package/lib/commonjs/ui/components/FollowButton.js +82 -34
  18. package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
  19. package/lib/commonjs/ui/components/GroupedSection.js +1 -1
  20. package/lib/commonjs/ui/components/OxyLogo.js +1 -1
  21. package/lib/commonjs/ui/components/OxyProvider.js +146 -141
  22. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  23. package/lib/commonjs/ui/components/OxySignInButton.js +4 -4
  24. package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
  25. package/lib/commonjs/ui/components/ProfileCard.js +2 -2
  26. package/lib/commonjs/ui/components/Section.js +1 -1
  27. package/lib/commonjs/ui/components/SectionTitle.js +1 -1
  28. package/lib/commonjs/ui/components/icon/index.js +1 -1
  29. package/lib/commonjs/ui/components/index.js +12 -12
  30. package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +213 -0
  31. package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +1 -0
  32. package/lib/commonjs/ui/components/internal/TextField.js +576 -0
  33. package/lib/commonjs/ui/components/internal/TextField.js.map +1 -0
  34. package/lib/commonjs/ui/context/OxyContext.js +12 -2
  35. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  36. package/lib/commonjs/ui/hooks/index.js +13 -0
  37. package/lib/commonjs/ui/hooks/index.js.map +1 -0
  38. package/lib/commonjs/ui/hooks/useFollow.js +184 -0
  39. package/lib/commonjs/ui/hooks/useFollow.js.map +1 -0
  40. package/lib/commonjs/ui/index.js +44 -12
  41. package/lib/commonjs/ui/index.js.map +1 -1
  42. package/lib/commonjs/ui/navigation/OxyRouter.js +23 -18
  43. package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
  44. package/lib/commonjs/ui/screens/AccountCenterScreen.js +21 -20
  45. package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
  46. package/lib/commonjs/ui/screens/AccountManagementDemo.js +3 -3
  47. package/lib/commonjs/ui/screens/AccountManagementDemo.js.map +1 -1
  48. package/lib/commonjs/ui/screens/AccountOverviewScreen.js +11 -10
  49. package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
  50. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +8 -7
  51. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  52. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +6 -5
  53. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
  54. package/lib/commonjs/ui/screens/AppInfoScreen.js +12 -14
  55. package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
  56. package/lib/commonjs/ui/screens/BillingManagementScreen.js +3 -3
  57. package/lib/commonjs/ui/screens/FeedbackScreen.js +1169 -0
  58. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -0
  59. package/lib/commonjs/ui/screens/FileManagementScreen.js +3 -3
  60. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +3 -3
  61. package/lib/commonjs/ui/screens/ProfileScreen.js +2 -2
  62. package/lib/commonjs/ui/screens/SessionManagementScreen.js +2 -2
  63. package/lib/commonjs/ui/screens/SignInScreen.js +183 -305
  64. package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
  65. package/lib/commonjs/ui/screens/SignUpScreen.js +811 -712
  66. package/lib/commonjs/ui/screens/SignUpScreen.js.map +1 -1
  67. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +8 -7
  68. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
  69. package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +2 -2
  70. package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +1 -1
  71. package/lib/commonjs/ui/store/index.js +267 -0
  72. package/lib/commonjs/ui/store/index.js.map +1 -0
  73. package/lib/commonjs/ui/styles/index.js +2 -2
  74. package/lib/commonjs/ui/styles/theme.js +1 -1
  75. package/lib/commonjs/utils/index.js +1 -1
  76. package/lib/module/assets/assets/illustrations/HighFive.tsx +41 -0
  77. package/lib/module/assets/icons/OxyServices.js +1 -1
  78. package/lib/module/assets/icons/OxyServices.js.map +1 -1
  79. package/lib/module/assets/illustrations/HighFive.js +55 -0
  80. package/lib/module/assets/illustrations/HighFive.js.map +1 -0
  81. package/lib/module/core/index.js +24 -5
  82. package/lib/module/core/index.js.map +1 -1
  83. package/lib/module/index.js +15 -11
  84. package/lib/module/index.js.map +1 -1
  85. package/lib/module/node/createAuth.js +90 -0
  86. package/lib/module/node/createAuth.js.map +1 -0
  87. package/lib/module/node/index.js +8 -4
  88. package/lib/module/node/index.js.map +1 -1
  89. package/lib/module/package.json +1 -0
  90. package/lib/module/ui/components/Avatar.js +2 -2
  91. package/lib/module/ui/components/Avatar.js.map +1 -1
  92. package/lib/module/ui/components/FollowButton.js +83 -35
  93. package/lib/module/ui/components/FollowButton.js.map +1 -1
  94. package/lib/module/ui/components/GroupedSection.js +1 -1
  95. package/lib/module/ui/components/GroupedSection.js.map +1 -1
  96. package/lib/module/ui/components/OxyLogo.js +1 -1
  97. package/lib/module/ui/components/OxyLogo.js.map +1 -1
  98. package/lib/module/ui/components/OxyProvider.js +143 -138
  99. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  100. package/lib/module/ui/components/OxySignInButton.js +4 -4
  101. package/lib/module/ui/components/OxySignInButton.js.map +1 -1
  102. package/lib/module/ui/components/ProfileCard.js +2 -2
  103. package/lib/module/ui/components/ProfileCard.js.map +1 -1
  104. package/lib/module/ui/components/Section.js +1 -1
  105. package/lib/module/ui/components/Section.js.map +1 -1
  106. package/lib/module/ui/components/SectionTitle.js +1 -1
  107. package/lib/module/ui/components/SectionTitle.js.map +1 -1
  108. package/lib/module/ui/components/icon/index.js +1 -1
  109. package/lib/module/ui/components/icon/index.js.map +1 -1
  110. package/lib/module/ui/components/index.js +12 -12
  111. package/lib/module/ui/components/index.js.map +1 -1
  112. package/lib/module/ui/components/internal/GroupedPillButtons.js +208 -0
  113. package/lib/module/ui/components/internal/GroupedPillButtons.js.map +1 -0
  114. package/lib/module/ui/components/internal/TextField.js +571 -0
  115. package/lib/module/ui/components/internal/TextField.js.map +1 -0
  116. package/lib/module/ui/context/OxyContext.js +12 -2
  117. package/lib/module/ui/context/OxyContext.js.map +1 -1
  118. package/lib/module/ui/hooks/index.js +4 -0
  119. package/lib/module/ui/hooks/index.js.map +1 -0
  120. package/lib/module/ui/hooks/useFollow.js +180 -0
  121. package/lib/module/ui/hooks/useFollow.js.map +1 -0
  122. package/lib/module/ui/index.js +21 -10
  123. package/lib/module/ui/index.js.map +1 -1
  124. package/lib/module/ui/navigation/OxyRouter.js +23 -18
  125. package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
  126. package/lib/module/ui/screens/AccountCenterScreen.js +9 -8
  127. package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
  128. package/lib/module/ui/screens/AccountManagementDemo.js +2 -2
  129. package/lib/module/ui/screens/AccountManagementDemo.js.map +1 -1
  130. package/lib/module/ui/screens/AccountOverviewScreen.js +11 -10
  131. package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
  132. package/lib/module/ui/screens/AccountSettingsScreen.js +8 -7
  133. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  134. package/lib/module/ui/screens/AccountSwitcherScreen.js +6 -5
  135. package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
  136. package/lib/module/ui/screens/AppInfoScreen.js +12 -14
  137. package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
  138. package/lib/module/ui/screens/BillingManagementScreen.js +3 -3
  139. package/lib/module/ui/screens/BillingManagementScreen.js.map +1 -1
  140. package/lib/module/ui/screens/FeedbackScreen.js +1164 -0
  141. package/lib/module/ui/screens/FeedbackScreen.js.map +1 -0
  142. package/lib/module/ui/screens/FileManagementScreen.js +3 -3
  143. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  144. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +3 -3
  145. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  146. package/lib/module/ui/screens/ProfileScreen.js +2 -2
  147. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  148. package/lib/module/ui/screens/SessionManagementScreen.js +2 -2
  149. package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
  150. package/lib/module/ui/screens/SignInScreen.js +183 -305
  151. package/lib/module/ui/screens/SignInScreen.js.map +1 -1
  152. package/lib/module/ui/screens/SignUpScreen.js +810 -712
  153. package/lib/module/ui/screens/SignUpScreen.js.map +1 -1
  154. package/lib/module/ui/screens/karma/KarmaCenterScreen.js +8 -7
  155. package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
  156. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +2 -2
  157. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
  158. package/lib/module/ui/screens/karma/KarmaRulesScreen.js +1 -1
  159. package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
  160. package/lib/module/ui/store/index.js +255 -0
  161. package/lib/module/ui/store/index.js.map +1 -0
  162. package/lib/module/ui/styles/index.js +2 -2
  163. package/lib/module/ui/styles/index.js.map +1 -1
  164. package/lib/module/ui/styles/theme.js +1 -1
  165. package/lib/module/ui/styles/theme.js.map +1 -1
  166. package/lib/module/utils/index.js +1 -1
  167. package/lib/module/utils/index.js.map +1 -1
  168. package/lib/typescript/assets/illustrations/HighFive.d.ts +9 -0
  169. package/lib/typescript/assets/illustrations/HighFive.d.ts.map +1 -0
  170. package/lib/typescript/core/index.d.ts +16 -3
  171. package/lib/typescript/core/index.d.ts.map +1 -1
  172. package/lib/typescript/index.d.ts +4 -2
  173. package/lib/typescript/index.d.ts.map +1 -1
  174. package/lib/typescript/node/createAuth.d.ts +7 -0
  175. package/lib/typescript/node/createAuth.d.ts.map +1 -0
  176. package/lib/typescript/node/index.d.ts +2 -0
  177. package/lib/typescript/node/index.d.ts.map +1 -1
  178. package/lib/typescript/types/expo-vector-icons.d.ts +3 -0
  179. package/lib/typescript/types/express.d.ts +5 -0
  180. package/lib/typescript/types/react-redux.d.ts +5 -0
  181. package/lib/typescript/ui/components/FollowButton.d.ts +1 -0
  182. package/lib/typescript/ui/components/FollowButton.d.ts.map +1 -1
  183. package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
  184. package/lib/typescript/ui/components/internal/GroupedPillButtons.d.ts +18 -0
  185. package/lib/typescript/ui/components/internal/GroupedPillButtons.d.ts.map +1 -0
  186. package/lib/typescript/ui/components/internal/TextField.d.ts +25 -0
  187. package/lib/typescript/ui/components/internal/TextField.d.ts.map +1 -0
  188. package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
  189. package/lib/typescript/ui/hooks/index.d.ts +2 -0
  190. package/lib/typescript/ui/hooks/index.d.ts.map +1 -0
  191. package/lib/typescript/ui/hooks/useFollow.d.ts +43 -0
  192. package/lib/typescript/ui/hooks/useFollow.d.ts.map +1 -0
  193. package/lib/typescript/ui/index.d.ts +5 -0
  194. package/lib/typescript/ui/index.d.ts.map +1 -1
  195. package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
  196. package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -1
  197. package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
  198. package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -1
  199. package/lib/typescript/ui/screens/FeedbackScreen.d.ts +5 -0
  200. package/lib/typescript/ui/screens/FeedbackScreen.d.ts.map +1 -0
  201. package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
  202. package/lib/typescript/ui/screens/SignUpScreen.d.ts.map +1 -1
  203. package/lib/typescript/ui/store/index.d.ts +66 -0
  204. package/lib/typescript/ui/store/index.d.ts.map +1 -0
  205. package/package.json +10 -25
  206. package/src/assets/illustrations/HighFive.tsx +41 -0
  207. package/src/core/index.ts +88 -3
  208. package/src/index.ts +19 -3
  209. package/src/node/createAuth.ts +116 -0
  210. package/src/node/index.ts +4 -0
  211. package/src/types/expo-vector-icons.d.ts +3 -0
  212. package/src/types/express.d.ts +5 -0
  213. package/src/types/react-redux.d.ts +5 -0
  214. package/src/ui/components/FollowButton.tsx +114 -56
  215. package/src/ui/components/OxyProvider.tsx +136 -135
  216. package/src/ui/components/OxySignInButton.tsx +2 -2
  217. package/src/ui/components/internal/GroupedPillButtons.tsx +253 -0
  218. package/src/ui/components/internal/TextField.tsx +694 -0
  219. package/src/ui/context/OxyContext.tsx +12 -2
  220. package/src/ui/hooks/index.ts +1 -0
  221. package/src/ui/hooks/useFollow.ts +173 -0
  222. package/src/ui/index.ts +15 -2
  223. package/src/ui/navigation/OxyRouter.tsx +8 -3
  224. package/src/ui/screens/AccountCenterScreen.tsx +17 -15
  225. package/src/ui/screens/AccountOverviewScreen.tsx +25 -25
  226. package/src/ui/screens/AccountSettingsScreen.tsx +30 -30
  227. package/src/ui/screens/AccountSwitcherScreen.tsx +34 -33
  228. package/src/ui/screens/AppInfoScreen.tsx +153 -155
  229. package/src/ui/screens/FeedbackScreen.tsx +1042 -0
  230. package/src/ui/screens/SignInScreen.tsx +181 -224
  231. package/src/ui/screens/SignUpScreen.tsx +772 -608
  232. package/src/ui/screens/karma/KarmaCenterScreen.tsx +4 -4
  233. package/src/ui/store/index.ts +245 -0
@@ -24,7 +24,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps> = ({
24
24
  goBack,
25
25
  navigate,
26
26
  }) => {
27
- const { user, oxyServices, isLoading: authLoading } = useOxy();
27
+ const { user, oxyServices, isLoading: authLoading, isAuthenticated } = useOxy();
28
28
  const [isLoading, setIsLoading] = useState(false);
29
29
  const [isSaving, setIsSaving] = useState(false);
30
30
 
@@ -74,10 +74,10 @@ const AccountSettingsScreen: React.FC<BaseScreenProps> = ({
74
74
  // Load user data
75
75
  useEffect(() => {
76
76
  if (user) {
77
- const userDisplayName = typeof user.name === 'string'
78
- ? user.name
77
+ const userDisplayName = typeof user.name === 'string'
78
+ ? user.name
79
79
  : user.name?.full || user.name?.first || '';
80
-
80
+
81
81
  setDisplayName(userDisplayName);
82
82
  setUsername(user.username || '');
83
83
  setEmail(user.email || '');
@@ -115,9 +115,9 @@ const AccountSettingsScreen: React.FC<BaseScreenProps> = ({
115
115
 
116
116
  await oxyServices.updateProfile(updates);
117
117
  toast.success('Profile updated successfully');
118
-
118
+
119
119
  animateSaveButton(1); // Scale back to normal
120
-
120
+
121
121
  if (onClose) {
122
122
  onClose();
123
123
  } else if (goBack) {
@@ -182,7 +182,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps> = ({
182
182
 
183
183
  const saveField = (type: string) => {
184
184
  animateSaveButton(0.95); // Scale down slightly for animation
185
-
185
+
186
186
  switch (type) {
187
187
  case 'displayName':
188
188
  setDisplayName(tempDisplayName);
@@ -203,7 +203,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps> = ({
203
203
  setWebsite(tempWebsite);
204
204
  break;
205
205
  }
206
-
206
+
207
207
  // Brief delay for animation, then reset and close editing
208
208
  setTimeout(() => {
209
209
  animateSaveButton(1);
@@ -263,7 +263,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps> = ({
263
263
  default: return '';
264
264
  }
265
265
  })();
266
-
266
+
267
267
  const setTempValue = (text: string) => {
268
268
  switch (type) {
269
269
  case 'displayName': setTempDisplayName(text); break;
@@ -285,7 +285,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps> = ({
285
285
  <TextInput
286
286
  style={[
287
287
  config.multiline ? styles.editingFieldTextArea : styles.editingFieldInput,
288
- {
288
+ {
289
289
  backgroundColor: themeStyles.isDarkTheme ? '#333' : '#fff',
290
290
  color: themeStyles.isDarkTheme ? '#fff' : '#000',
291
291
  borderColor: themeStyles.primaryColor
@@ -326,7 +326,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps> = ({
326
326
  ];
327
327
 
328
328
  return (
329
- <TouchableOpacity
329
+ <TouchableOpacity
330
330
  style={itemStyles}
331
331
  onPress={() => startEditing(type, value)}
332
332
  >
@@ -344,7 +344,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps> = ({
344
344
  );
345
345
  };
346
346
 
347
- if (authLoading || !user) {
347
+ if (authLoading || !isAuthenticated) {
348
348
  return (
349
349
  <View style={[styles.container, { backgroundColor: themeStyles.backgroundColor, justifyContent: 'center' }]}>
350
350
  <ActivityIndicator size="large" color={themeStyles.primaryColor} />
@@ -363,14 +363,14 @@ const AccountSettingsScreen: React.FC<BaseScreenProps> = ({
363
363
  <Ionicons name="close" size={24} color="#666" />
364
364
  </TouchableOpacity>
365
365
  <Animated.View style={{ transform: [{ scale: saveButtonScale }] }}>
366
- <TouchableOpacity
366
+ <TouchableOpacity
367
367
  style={[
368
- styles.saveHeaderButton,
369
- {
368
+ styles.saveHeaderButton,
369
+ {
370
370
  opacity: isSaving ? 0.7 : 1,
371
371
  backgroundColor: editingField ? getFieldIcon(editingField).color : '#007AFF'
372
372
  }
373
- ]}
373
+ ]}
374
374
  onPress={() => saveField(editingField)}
375
375
  disabled={isSaving}
376
376
  >
@@ -384,11 +384,11 @@ const AccountSettingsScreen: React.FC<BaseScreenProps> = ({
384
384
  </View>
385
385
  <View style={styles.editingHeaderBottom}>
386
386
  <View style={styles.headerTitleWithIcon}>
387
- <OxyIcon
388
- name={getFieldIcon(editingField).name}
389
- size={50}
390
- color={getFieldIcon(editingField).color}
391
- style={styles.headerIcon}
387
+ <OxyIcon
388
+ name={getFieldIcon(editingField).name}
389
+ size={50}
390
+ color={getFieldIcon(editingField).color}
391
+ style={styles.headerIcon}
392
392
  />
393
393
  <Text style={styles.headerTitleLarge}>{getFieldLabel(editingField)}</Text>
394
394
  </View>
@@ -401,8 +401,8 @@ const AccountSettingsScreen: React.FC<BaseScreenProps> = ({
401
401
  </TouchableOpacity>
402
402
  <Text style={styles.headerTitle}>Account Settings</Text>
403
403
  <Animated.View style={{ transform: [{ scale: saveButtonScale }] }}>
404
- <TouchableOpacity
405
- style={[styles.saveIconButton, { opacity: isSaving ? 0.7 : 1 }]}
404
+ <TouchableOpacity
405
+ style={[styles.saveIconButton, { opacity: isSaving ? 0.7 : 1 }]}
406
406
  onPress={handleSave}
407
407
  disabled={isSaving}
408
408
  >
@@ -429,8 +429,8 @@ const AccountSettingsScreen: React.FC<BaseScreenProps> = ({
429
429
  {/* Profile Picture Section */}
430
430
  <View style={styles.section}>
431
431
  <Text style={styles.sectionTitle}>Profile Picture</Text>
432
-
433
- <TouchableOpacity
432
+
433
+ <TouchableOpacity
434
434
  style={[styles.settingItem, styles.firstSettingItem, styles.lastSettingItem]}
435
435
  onPress={handleAvatarUpdate}
436
436
  >
@@ -457,7 +457,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps> = ({
457
457
  {/* Basic Information */}
458
458
  <View style={styles.section}>
459
459
  <Text style={styles.sectionTitle}>Basic Information</Text>
460
-
460
+
461
461
  {renderField(
462
462
  'displayName',
463
463
  'Display Name',
@@ -501,7 +501,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps> = ({
501
501
  {/* About You */}
502
502
  <View style={styles.section}>
503
503
  <Text style={styles.sectionTitle}>About You</Text>
504
-
504
+
505
505
  {renderField(
506
506
  'bio',
507
507
  'Bio',
@@ -545,8 +545,8 @@ const AccountSettingsScreen: React.FC<BaseScreenProps> = ({
545
545
  {/* Quick Actions */}
546
546
  <View style={styles.section}>
547
547
  <Text style={styles.sectionTitle}>Quick Actions</Text>
548
-
549
- <TouchableOpacity
548
+
549
+ <TouchableOpacity
550
550
  style={[styles.settingItem, styles.firstSettingItem]}
551
551
  onPress={() => toast.info('Privacy settings coming soon!')}
552
552
  >
@@ -560,7 +560,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps> = ({
560
560
  <OxyIcon name="chevron-forward" size={16} color="#ccc" />
561
561
  </TouchableOpacity>
562
562
 
563
- <TouchableOpacity
563
+ <TouchableOpacity
564
564
  style={[styles.settingItem, styles.lastSettingItem]}
565
565
  onPress={() => toast.info('Account verification coming soon!')}
566
566
  >
@@ -43,20 +43,21 @@ const ModernAccountSwitcherScreen: React.FC<BaseScreenProps> = ({
43
43
  goBack,
44
44
  oxyServices,
45
45
  }) => {
46
- const {
47
- user,
48
- sessions,
46
+ const {
47
+ user,
48
+ sessions,
49
49
  activeSessionId,
50
- switchSession,
51
- removeSession,
50
+ switchSession,
51
+ removeSession,
52
52
  logoutAll,
53
- isLoading
53
+ isLoading,
54
+ isAuthenticated
54
55
  } = useOxy();
55
56
 
56
57
  const [sessionsWithUsers, setSessionsWithUsers] = useState<SessionWithUser[]>([]);
57
58
  const [switchingToUserId, setSwitchingToUserId] = useState<string | null>(null);
58
59
  const [removingUserId, setRemovingUserId] = useState<string | null>(null);
59
-
60
+
60
61
  // Device session management state
61
62
  const [showDeviceManagement, setShowDeviceManagement] = useState(false);
62
63
  const [deviceSessions, setDeviceSessions] = useState<DeviceSession[]>([]);
@@ -66,7 +67,7 @@ const ModernAccountSwitcherScreen: React.FC<BaseScreenProps> = ({
66
67
 
67
68
  const screenWidth = Dimensions.get('window').width;
68
69
  const isDarkTheme = theme === 'dark';
69
-
70
+
70
71
  // Modern color scheme
71
72
  const colors = {
72
73
  background: isDarkTheme ? '#000000' : '#FFFFFF',
@@ -99,19 +100,19 @@ const ModernAccountSwitcherScreen: React.FC<BaseScreenProps> = ({
99
100
  try {
100
101
  // Try to get user profile using the session
101
102
  const userProfile = await oxyServices.getUserBySession(session.sessionId);
102
-
103
- setSessionsWithUsers(prev =>
104
- prev.map(s =>
105
- s.sessionId === session.sessionId
103
+
104
+ setSessionsWithUsers(prev =>
105
+ prev.map(s =>
106
+ s.sessionId === session.sessionId
106
107
  ? { ...s, userProfile, isLoadingProfile: false }
107
108
  : s
108
109
  )
109
110
  );
110
111
  } catch (error) {
111
112
  console.error(`Failed to load profile for session ${session.sessionId}:`, error);
112
- setSessionsWithUsers(prev =>
113
- prev.map(s =>
114
- s.sessionId === session.sessionId
113
+ setSessionsWithUsers(prev =>
114
+ prev.map(s =>
115
+ s.sessionId === session.sessionId
115
116
  ? { ...s, isLoadingProfile: false }
116
117
  : s
117
118
  )
@@ -145,7 +146,7 @@ const ModernAccountSwitcherScreen: React.FC<BaseScreenProps> = ({
145
146
  const sessionToRemove = sessionsWithUsers.find(s => s.sessionId === sessionId);
146
147
  if (!sessionToRemove) return;
147
148
 
148
- const displayName = typeof sessionToRemove.userProfile?.name === 'object'
149
+ const displayName = typeof sessionToRemove.userProfile?.name === 'object'
149
150
  ? sessionToRemove.userProfile.name.full || sessionToRemove.userProfile.name.first || sessionToRemove.userProfile.username
150
151
  : sessionToRemove.userProfile?.name || sessionToRemove.userProfile?.username || 'this account';
151
152
 
@@ -187,20 +188,20 @@ const ModernAccountSwitcherScreen: React.FC<BaseScreenProps> = ({
187
188
  console.log('🔴 sessions array:', sessions);
188
189
  console.log('🔴 isLoading:', isLoading);
189
190
  console.log('🔴 logoutAll function type:', typeof logoutAll);
190
-
191
+
191
192
  // Check if we have the required data
192
193
  if (!activeSessionId) {
193
194
  console.error('🔴 ERROR: No activeSessionId found!');
194
195
  toast.error('No active session found. You may already be logged out.');
195
196
  return;
196
197
  }
197
-
198
+
198
199
  if (typeof logoutAll !== 'function') {
199
200
  console.error('🔴 ERROR: logoutAll is not a function!', typeof logoutAll);
200
201
  toast.error('Logout function not available. Please try refreshing the app.');
201
202
  return;
202
203
  }
203
-
204
+
204
205
  // TEMPORARY: Skip confirmation dialog to test direct logout
205
206
  console.log('🔴 TESTING: Bypassing confirmation dialog for direct test');
206
207
  try {
@@ -222,7 +223,7 @@ const ModernAccountSwitcherScreen: React.FC<BaseScreenProps> = ({
222
223
  // Device session management functions
223
224
  const loadAllDeviceSessions = async () => {
224
225
  if (!oxyServices || !user?.sessionId) return;
225
-
226
+
226
227
  setLoadingDeviceSessions(true);
227
228
  try {
228
229
  // This would call the API to get all device sessions for the current user
@@ -270,7 +271,7 @@ const ModernAccountSwitcherScreen: React.FC<BaseScreenProps> = ({
270
271
 
271
272
  const handleLogoutAllDevices = async () => {
272
273
  const otherDevicesCount = deviceSessions.filter(session => !session.isCurrent).length;
273
-
274
+
274
275
  if (otherDevicesCount === 0) {
275
276
  toast.info('No other device sessions found to sign out from.');
276
277
  return;
@@ -331,10 +332,10 @@ const ModernAccountSwitcherScreen: React.FC<BaseScreenProps> = ({
331
332
  ) : (
332
333
  <>
333
334
  {/* Current Account */}
334
- {user && (
335
+ {isAuthenticated && user && (
335
336
  <View style={styles.section}>
336
337
  <Text style={styles.sectionTitle}>Current Account</Text>
337
-
338
+
338
339
  <View style={[styles.settingItem, styles.firstSettingItem, styles.lastSettingItem, styles.currentAccountCard]}>
339
340
  <View style={styles.userIcon}>
340
341
  {user.avatar?.url ? (
@@ -371,7 +372,7 @@ const ModernAccountSwitcherScreen: React.FC<BaseScreenProps> = ({
371
372
  <Text style={styles.sectionTitle}>
372
373
  Other Accounts ({sessionsWithUsers.filter(s => s.sessionId !== activeSessionId).length})
373
374
  </Text>
374
-
375
+
375
376
  {sessionsWithUsers
376
377
  .filter(s => s.sessionId !== activeSessionId)
377
378
  .map((sessionWithUser, index, filteredArray) => {
@@ -381,8 +382,8 @@ const ModernAccountSwitcherScreen: React.FC<BaseScreenProps> = ({
381
382
  const isRemoving = removingUserId === sessionWithUser.sessionId;
382
383
  const { userProfile, isLoadingProfile } = sessionWithUser;
383
384
 
384
- const displayName = typeof userProfile?.name === 'object'
385
- ? userProfile.name.full || userProfile.name.first || userProfile.username
385
+ const displayName = typeof userProfile?.name === 'object'
386
+ ? userProfile.name.full || userProfile.name.first || userProfile.username
386
387
  : userProfile?.name || userProfile?.username || 'Unknown User';
387
388
 
388
389
  return (
@@ -450,7 +451,7 @@ const ModernAccountSwitcherScreen: React.FC<BaseScreenProps> = ({
450
451
  {/* Quick Actions */}
451
452
  <View style={styles.section}>
452
453
  <Text style={styles.sectionTitle}>Quick Actions</Text>
453
-
454
+
454
455
  <TouchableOpacity
455
456
  style={[styles.settingItem, styles.firstSettingItem]}
456
457
  onPress={() => navigate?.('SignIn')}
@@ -507,7 +508,7 @@ const ModernAccountSwitcherScreen: React.FC<BaseScreenProps> = ({
507
508
  {showDeviceManagement && (
508
509
  <View style={styles.section}>
509
510
  <Text style={styles.sectionTitle}>Device Sessions</Text>
510
-
511
+
511
512
  {loadingDeviceSessions ? (
512
513
  <View style={[styles.settingItem, styles.firstSettingItem, styles.lastSettingItem]}>
513
514
  <View style={styles.loadingContainer}>
@@ -539,11 +540,11 @@ const ModernAccountSwitcherScreen: React.FC<BaseScreenProps> = ({
539
540
  ]}
540
541
  >
541
542
  <View style={styles.settingInfo}>
542
- <OxyIcon
543
- name={session.isCurrent ? "phone-portrait" : "phone-portrait-outline"}
544
- size={20}
545
- color={session.isCurrent ? "#34C759" : "#8E8E93"}
546
- style={styles.settingIcon}
543
+ <OxyIcon
544
+ name={session.isCurrent ? "phone-portrait" : "phone-portrait-outline"}
545
+ size={20}
546
+ color={session.isCurrent ? "#34C759" : "#8E8E93"}
547
+ style={styles.settingIcon}
547
548
  />
548
549
  <View>
549
550
  <Text style={styles.settingLabel}>