decord/source/modules/game_relationships/hooks/useUserProfileGameFriendApplicationIds.tsx

45 lines
1.6 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 12350
// Function ID: 12351
2026-07-20 16:05:17 +00:00
// Name: useUserProfileGameFriendApplicationIds
2026-08-24 06:08:38 +00:00
// Dependencies: [19, 4033, 1922, 589, 12224, 2]
2026-07-20 16:05:17 +00:00
// Exports: useUserProfileGameFriendApplicationIds
2026-08-24 06:08:38 +00:00
// Module 12350 (useUserProfileGameFriendApplicationIds)
import closure_2 from "noop" /* 19 */;
import closure_3 from "markAllUserIdListsStale" /* 4033 */;
import closure_4 from "mergeGuildAvatar" /* 1922 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-20 16:05:17 +00:00
let closure_5 = [];
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/game_relationships/hooks/useUserProfileGameFriendApplicationIds.tsx");
2026-07-20 16:05:17 +00:00
export const useUserProfileGameFriendApplicationIds = function useUserProfileGameFriendApplicationIds(userId) {
userId = userId.userId;
2026-07-29 08:29:29 +00:00
let stateFromStores;
let gameFriendsForUser;
2026-08-24 06:08:38 +00:00
const items = [closure_3, closure_4];
2026-07-23 10:11:24 +00:00
stateFromStores = userId(stateFromStores[3]).useStateFromStores(items, () => {
2026-08-24 06:08:38 +00:00
let isFriendResult = closure_1_3.isFriend(userId);
2026-07-20 16:05:17 +00:00
if (!isFriendResult) {
2026-08-24 06:08:38 +00:00
const user = closure_1_4.getUser(userId);
2026-07-20 16:05:17 +00:00
let isProvisional;
2026-07-29 08:29:29 +00:00
if (user != null) {
2026-07-20 16:05:17 +00:00
isProvisional = user.isProvisional;
}
isFriendResult = isProvisional;
}
return isFriendResult;
});
2026-07-23 10:11:24 +00:00
const obj = userId(stateFromStores[3]);
2026-07-29 08:29:29 +00:00
gameFriendsForUser = userId(stateFromStores[4]).useGameFriendsForUser(userId);
2026-07-20 16:05:17 +00:00
const items1 = [gameFriendsForUser, stateFromStores];
2026-07-23 10:11:24 +00:00
return gameFriendsForUser.useMemo(() => {
2026-07-20 16:05:17 +00:00
if (stateFromStores) {
2026-08-24 06:08:38 +00:00
let mapped = closure_1_5;
2026-07-20 16:05:17 +00:00
} else {
mapped = gameFriendsForUser.map((applicationId) => applicationId.applicationId);
}
return mapped;
}, items1);
};