@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.
- package/lib/commonjs/core/index.js +59 -0
- package/lib/commonjs/core/index.js.map +1 -1
- package/lib/commonjs/ui/components/FollowButton.js +23 -8
- package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
- package/lib/commonjs/ui/hooks/useFollow.js +29 -10
- package/lib/commonjs/ui/hooks/useFollow.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +19 -37
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +9 -27
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/store/index.js +5 -1
- package/lib/commonjs/ui/store/index.js.map +1 -1
- package/lib/module/core/index.js +59 -0
- package/lib/module/core/index.js.map +1 -1
- package/lib/module/ui/components/FollowButton.js +23 -8
- package/lib/module/ui/components/FollowButton.js.map +1 -1
- package/lib/module/ui/hooks/useFollow.js +29 -10
- package/lib/module/ui/hooks/useFollow.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +19 -37
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +9 -27
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/store/index.js +5 -1
- package/lib/module/ui/store/index.js.map +1 -1
- package/lib/typescript/core/index.d.ts +28 -0
- package/lib/typescript/core/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/FollowButton.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useFollow.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/ui/store/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/ui/components/FollowButton.tsx +25 -11
- package/src/ui/hooks/useFollow.ts +30 -10
- package/src/ui/screens/AppInfoScreen.tsx +23 -40
- package/src/ui/screens/FileManagementScreen.tsx +248 -268
- package/src/ui/store/index.ts +6 -1
package/src/ui/store/index.ts
CHANGED
|
@@ -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
|
|
240
|
+
state.follow?.fetchingUsers?.[userId] ?? false;
|
|
236
241
|
|
|
237
242
|
export const store = configureStore({
|
|
238
243
|
reducer: {
|