decord/source/modules/user_profile/hooks/useDisplayProfile.tsx
github-actions 7450227d0b chore: update source for alpha 345.4
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9596_m.js (380.6 MB)
2026-09-04 17:41:35 +00:00

99 lines
2.9 KiB
TypeScript

// Module ID: 8117
// Function ID: 8118
// Name: useDisplayProfile
// Dependencies: [19, 1921, 7554, 586, 8118, 1990, 8120, 2]
// Exports: default, getDisplayProfile, useDisplayProfileWithFetchEffect
// Module 8117 (useDisplayProfile)
import premiumSinceDefault from "premiumSince" /* 8120 */;
import closure_3 from "noop" /* 19 */;
import closure_4 from "mergeGuildAvatar" /* 1921 */;
import closure_5 from "createUserWidgetFromServer" /* 7554 */;
import areArraysShallowlyEqual from "areArraysShallowlyEqual" /* 1990 */;
const require = arg1;
let closure_6 = areArraysShallowlyEqual.cachedFunction((arg0, arg1) => new premiumSinceDefault(arg0, arg1));
const result = require("set").fileFinishedImporting("modules/user_profile/hooks/useDisplayProfile.tsx");
export default function useDisplayProfile(arg0, arg1) {
const _require = arg0;
closure_1 = arg1;
const items = [closure_4, closure_5];
return _require(586).useStateFromStores(items, () => {
let tmp2 = null;
if (null != closure_0) {
const items = [closure_1_4, closure_1_5];
[obj, obj2] = items;
let tmp6 = null;
if (null !== tmp) {
const user = obj.getUser(tmp);
const userProfile = obj2.getUserProfile(tmp);
let tmp10 = null;
if (null != user) {
tmp10 = null;
if (null != userProfile) {
tmp10 = closure_1_6(userProfile, tmp9);
}
}
tmp6 = tmp10;
}
tmp2 = tmp6;
}
return tmp2;
});
};
export const useDisplayProfileWithFetchEffect = function useDisplayProfileWithFetchEffect(arg0, arg1) {
let _require = arg0;
closure_1 = arg1;
let items = [arg1, arg0];
const effect = React.useEffect(() => {
callback(closure_1_2[4])(closure_0, undefined, { guildId: callback });
}, items);
_require = arg0;
closure_1 = arg1;
const items1 = [closure_4, closure_5];
return _require(586).useStateFromStores(items1, () => {
let tmp2 = null;
if (null != closure_0) {
const items = [closure_1_4, closure_1_5];
[obj, obj2] = items;
let tmp6 = null;
if (null !== tmp) {
const user = obj.getUser(tmp);
const userProfile = obj2.getUserProfile(tmp);
let tmp10 = null;
if (null != user) {
tmp10 = null;
if (null != userProfile) {
tmp10 = closure_1_6(userProfile, tmp9);
}
}
tmp6 = tmp10;
}
tmp2 = tmp6;
}
return tmp2;
});
};
export const getDisplayProfile = function getDisplayProfile(id, arg1) {
let tmp = arg2;
if (arg2 === undefined) {
const items = [closure_4, closure_5];
tmp = items;
}
[obj, obj2] = tmp;
if (null === id) {
return null;
} else {
const user = obj.getUser(id);
const userProfile = obj2.getUserProfile(id);
let tmp8 = null;
if (null != user) {
tmp8 = null;
if (null != userProfile) {
tmp8 = callback(userProfile, tmp7);
}
}
return tmp8;
}
};