decord/source/modules/user_profile/hooks/useDisplayProfile.tsx

75 lines
2.1 KiB
TypeScript
Raw Normal View History

2026-07-24 07:16:23 +00:00
// Module ID: 7974
// Function ID: 63091
2026-07-20 16:05:17 +00:00
// Name: useDisplayProfile
2026-07-24 07:16:23 +00:00
// Dependencies: [31, 1849, 6855, 566, 7975, 1916, 7978, 2]
2026-07-20 16:05:17 +00:00
// Exports: useDisplayProfileWithFetchEffect
2026-07-24 07:16:23 +00:00
// Module 7974 (useDisplayProfile)
2026-07-23 10:11:24 +00:00
import result from "result";
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import closure_5 from "_isNativeReflectConstruct";
import areArraysShallowlyEqual from "areArraysShallowlyEqual";
const require = arg1;
2026-07-20 16:05:17 +00:00
function useDisplayProfile(arg0, arg1) {
2026-07-23 10:11:24 +00:00
const _require = arg0;
let closure_1 = arg1;
let items = [_isNativeReflectConstruct, closure_5];
return _require(566).useStateFromStores(items, () => {
2026-07-20 16:05:17 +00:00
let tmp = null;
2026-07-23 10:11:24 +00:00
if (null != closure_0) {
const items = [outer1_4, outer1_5];
tmp = outer1_8(closure_0, closure_1, items);
2026-07-20 16:05:17 +00:00
}
return tmp;
});
}
function getDisplayProfile(id, arg1) {
let obj;
let obj2;
let tmp = arg2;
if (arg2 === undefined) {
2026-07-23 10:11:24 +00:00
const items = [_isNativeReflectConstruct, closure_5];
2026-07-20 16:05:17 +00:00
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;
}
}
2026-07-23 10:11:24 +00:00
let closure_6 = areArraysShallowlyEqual.cachedFunction((arg0, arg1) => {
2026-07-24 07:16:23 +00:00
let tmp = importDefault(7978);
2026-07-20 16:05:17 +00:00
tmp = new tmp(arg0, arg1);
return tmp;
});
2026-07-23 10:11:24 +00:00
const result = require("_isNativeReflectConstruct").fileFinishedImporting("modules/user_profile/hooks/useDisplayProfile.tsx");
2026-07-20 16:05:17 +00:00
export default useDisplayProfile;
export const useDisplayProfileWithFetchEffect = function useDisplayProfileWithFetchEffect(arg0, arg1) {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0;
let closure_1 = arg1;
2026-07-20 16:05:17 +00:00
const items = [arg1, arg0];
const effect = React.useEffect(() => {
const obj = {};
let tmp3;
2026-07-23 10:11:24 +00:00
if (null != callback) {
tmp3 = callback;
2026-07-20 16:05:17 +00:00
}
obj.guildId = tmp3;
2026-07-23 10:11:24 +00:00
callback(outer1_2[4])(closure_0, undefined, obj);
2026-07-20 16:05:17 +00:00
}, items);
return useDisplayProfile(arg0, arg1);
};
export { getDisplayProfile };