@oxyhq/services 5.4.5 → 5.4.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.
Files changed (37) hide show
  1. package/lib/commonjs/core/index.js +59 -0
  2. package/lib/commonjs/core/index.js.map +1 -1
  3. package/lib/commonjs/ui/components/FollowButton.js +23 -8
  4. package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
  5. package/lib/commonjs/ui/hooks/useFollow.js +29 -10
  6. package/lib/commonjs/ui/hooks/useFollow.js.map +1 -1
  7. package/lib/commonjs/ui/screens/AppInfoScreen.js +19 -37
  8. package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
  9. package/lib/commonjs/ui/screens/FileManagementScreen.js +9 -27
  10. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  11. package/lib/commonjs/ui/store/index.js +5 -1
  12. package/lib/commonjs/ui/store/index.js.map +1 -1
  13. package/lib/module/core/index.js +59 -0
  14. package/lib/module/core/index.js.map +1 -1
  15. package/lib/module/ui/components/FollowButton.js +23 -8
  16. package/lib/module/ui/components/FollowButton.js.map +1 -1
  17. package/lib/module/ui/hooks/useFollow.js +29 -10
  18. package/lib/module/ui/hooks/useFollow.js.map +1 -1
  19. package/lib/module/ui/screens/AppInfoScreen.js +19 -37
  20. package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
  21. package/lib/module/ui/screens/FileManagementScreen.js +9 -27
  22. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  23. package/lib/module/ui/store/index.js +5 -1
  24. package/lib/module/ui/store/index.js.map +1 -1
  25. package/lib/typescript/core/index.d.ts +28 -0
  26. package/lib/typescript/core/index.d.ts.map +1 -1
  27. package/lib/typescript/ui/components/FollowButton.d.ts.map +1 -1
  28. package/lib/typescript/ui/hooks/useFollow.d.ts.map +1 -1
  29. package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -1
  30. package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +1 -1
  31. package/lib/typescript/ui/store/index.d.ts.map +1 -1
  32. package/package.json +1 -1
  33. package/src/ui/components/FollowButton.tsx +25 -11
  34. package/src/ui/hooks/useFollow.ts +30 -10
  35. package/src/ui/screens/AppInfoScreen.tsx +23 -40
  36. package/src/ui/screens/FileManagementScreen.tsx +248 -268
  37. package/src/ui/store/index.ts +6 -1
@@ -55,6 +55,11 @@ export const fetchFollowStatus = createAsyncThunk(
55
55
  // Prevent duplicate requests for the same user ID
56
56
  condition: ({ userId }, { getState }) => {
57
57
  const state = getState() as RootState;
58
+ // Defensive check for follow state
59
+ if (!state.follow?.fetchingUsers) {
60
+ return true; // Allow request if state not initialized
61
+ }
62
+
58
63
  const isAlreadyFetching = state.follow.fetchingUsers[userId];
59
64
 
60
65
  if (isAlreadyFetching) {
@@ -232,7 +237,7 @@ export const { setFollowingStatus, clearFollowError, resetFollowState } = follow
232
237
 
233
238
  // Selectors for follow state
234
239
  export const selectIsUserBeingFetched = (state: RootState, userId: string) =>
235
- state.follow.fetchingUsers[userId] ?? false;
240
+ state.follow?.fetchingUsers?.[userId] ?? false;
236
241
 
237
242
  export const store = configureStore({
238
243
  reducer: {