86 lines
2.1 KiB
TypeScript
86 lines
2.1 KiB
TypeScript
// Module ID: 11755
|
|
// Function ID: 11756
|
|
// Name: useIsHubForGuild
|
|
// Dependencies: [2073, 1086, 558, 576, 504, 2]
|
|
|
|
// Module 11755 (useIsHubForGuild)
|
|
import Constants from "Constants" /* 1086 */;
|
|
import GuildStore from "GuildStore" /* 2073 */;
|
|
import ReactCompilerGating from "ReactCompilerGating" /* 558 */;
|
|
import size from "module_2" /* 2 */;
|
|
|
|
const require = globalThis.__r;
|
|
let _require;
|
|
|
|
const GuildFeatures = Constants.GuildFeatures;
|
|
const tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? ((arg0) => {
|
|
let closure_0;
|
|
let first;
|
|
let tmp6;
|
|
let tmp7;
|
|
_require = arg0;
|
|
const tmp = _require;
|
|
const obj = require("react");
|
|
const cResult = obj.c(4);
|
|
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
const items = [GuildStore];
|
|
cResult[0] = items;
|
|
first = items;
|
|
} else {
|
|
first = cResult[0];
|
|
}
|
|
if (cResult[1] !== arg0) {
|
|
const fn = function l() {
|
|
if (null == closure_0) {
|
|
return false;
|
|
} else {
|
|
const guild = GuildStore.getGuild(tmp);
|
|
let flag;
|
|
if (guild != null) {
|
|
const features = guild.features;
|
|
flag = features.has(GuildFeatures.HUB);
|
|
}
|
|
if (flag == null) {
|
|
flag = false;
|
|
}
|
|
return flag;
|
|
}
|
|
};
|
|
const items1 = [arg0];
|
|
cResult[1] = arg0;
|
|
cResult[2] = fn;
|
|
cResult[3] = items1;
|
|
tmp7 = items1;
|
|
tmp6 = fn;
|
|
} else {
|
|
tmp6 = cResult[2];
|
|
tmp7 = cResult[3];
|
|
}
|
|
const tmpResult = tmp(504);
|
|
return tmpResult.useStateFromStores(first, tmp6, tmp7);
|
|
}) : ((arg0) => {
|
|
let closure_0;
|
|
_require = arg0;
|
|
const items = [GuildStore];
|
|
const items1 = [arg0];
|
|
const obj = require("get initialized");
|
|
return obj.useStateFromStores(items, () => {
|
|
if (null == closure_0) {
|
|
return false;
|
|
} else {
|
|
const guild = GuildStore.getGuild(tmp);
|
|
let flag;
|
|
if (guild != null) {
|
|
const features = guild.features;
|
|
flag = features.has(GuildFeatures.HUB);
|
|
}
|
|
if (flag == null) {
|
|
flag = false;
|
|
}
|
|
return flag;
|
|
}
|
|
}, items1);
|
|
});
|
|
const result = size.fileFinishedImporting("modules/hub/useIsHubForGuild.tsx");
|
|
|
|
export default tmp2;
|