decord/source/modules/guild_profile/hooks/useGuildProfile.tsx

108 lines
3.1 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 8892
// Function ID: 8893
2026-07-20 16:05:17 +00:00
// Name: useGuildProfile
2026-08-24 06:08:38 +00:00
// Dependencies: [5, 19, 8891, 589, 8893, 2]
2026-07-20 16:05:17 +00:00
// Exports: useGuildProfile
2026-08-24 06:08:38 +00:00
// Module 8892 (useGuildProfile)
import closure_2 from "asyncGeneratorStep" /* 5 */;
import closure_3 from "noop" /* 19 */;
import closure_4 from "handleUpdateStart" /* 8891 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/guild_profile/hooks/useGuildProfile.tsx");
2026-07-20 16:05:17 +00:00
export const useGuildProfile = function useGuildProfile(guildId) {
2026-07-23 10:11:24 +00:00
const _require = guildId;
2026-07-29 08:29:29 +00:00
let obj = _require(589);
2026-08-24 06:08:38 +00:00
const items = [closure_4];
const stateFromStores = obj.useStateFromStores(items, () => closure_1_4.getProfile(closure_0));
const items1 = [closure_4];
2026-07-29 08:29:29 +00:00
obj = { guildProfile: stateFromStores, fetchGuildProfile: null, fetchStatus: null };
2026-08-24 06:08:38 +00:00
const stateFromStores1 = _require(589).useStateFromStores(items1, () => closure_1_4.getFetchStatus(closure_0));
2026-07-20 16:05:17 +00:00
const items2 = [guildId];
2026-07-29 08:29:29 +00:00
obj[1] = React.useCallback(callback(() => {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
c3 = 0;
c4 = 0;
2026-07-29 08:29:29 +00:00
const iter = (function*() {
2026-08-12 06:57:52 +00:00
if (c4 === 2) {
c4 = 3;
HermesBuiltin.throwTypeError();
} else if (tmp4 === 3) {
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-08-24 06:08:38 +00:00
return { value: "HermesInternal", done: null };
2026-08-12 06:57:52 +00:00
}
} else {
try {
c4 = 2;
if (0 === c3) {
if (arg0 === 1) {
c4 = 3;
throw arg1;
} else if (arg0 === 2) {
c4 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-08-24 06:08:38 +00:00
closure_2 = tmp5;
closure_1 = tmp2;
2026-08-12 06:57:52 +00:00
let flag;
if (flag === undefined) {
flag = false;
}
c3 = 1;
c4 = 1;
return { value: "ct", done: true };
}
} else if (1 === tmp5) {
if (arg0 === 1) {
c4 = 3;
throw arg1;
} else if (arg0 === 2) {
c4 = 3;
2026-08-24 06:08:38 +00:00
obj1 = { value: null, done: true };
2026-08-12 06:57:52 +00:00
obj1[0] = arg1;
return obj1;
} else {
2026-08-24 06:08:38 +00:00
let obj2 = callback(closure_1_1[4]);
2026-08-12 06:57:52 +00:00
c3 = 2;
c4 = 1;
obj2 = { value: null, done: false };
obj2[0] = obj2.getGuildProfile(flag, flag);
return obj2;
}
} else if (arg0 === 1) {
c4 = 3;
throw arg1;
} else if (arg0 === 2) {
c4 = 3;
const obj3 = { value: null, done: true };
obj3[0] = arg1;
return obj3;
} else {
c4 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
}
} catch (tmp12) {
c4 = tmp;
throw tmp12;
}
2026-07-29 08:29:29 +00:00
}
})();
iter.next();
return iter;
}), items2);
obj[2] = stateFromStores1;
2026-07-20 16:05:17 +00:00
return obj;
};