Files
discord-decomp/sources/modules/age_gate/useIsNsfwGated.tsx
T
2026-07-28 01:06:53 +03:00

35 lines
2.4 KiB
TypeScript

/* Metro module 9618; source: modules/age_gate/useIsNsfwGated.tsx; dependencies: [5073, 1878, 566, 2] */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import GuildNSFWAgreeStore from '../../stores/GuildNSFWAgreeStore.tsx'; /* Metro dependency 5073 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
function _fun75342(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9804:6, offset: 0x01dab1ff, size: 130 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(FileImportTrackerModule).fileFinishedImporting('modules/age_gate/useIsNsfwGated.tsx');
exports.default = useIsNsfwGated;
function useIsNsfwGated(a0) { // fn#75343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9804:195, offset: 0x01dab281, size: 132 bytes, params: 2, frame: 20
const env0_0 = a0;
const nsfw = a0.nsfw;
const useStateFromStores = FluxModule.useStateFromStores;
const value3 = Reflect.apply(useStateFromStores, FluxModule, [[UserStore], _fun75344]) === false;
const value = FluxModule.useStateFromStores([GuildNSFWAgreeStore], _fun75345);
return nsfw && (value ? value3 : !value);
function _fun75344() { // fn#75344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9804:274, offset: 0x01dab305, size: 35 bytes, params: 1, frame: 10
const value = environment.__proto__;
return UserStore.getCurrentUser()?.nsfwAllowed;
}
function _fun75345() { // fn#75345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9804:380, offset: 0x01dab328, size: 32 bytes, params: 1, frame: 11
const guildNSFWAgreeStoreBinding = GuildNSFWAgreeStore;
return guildNSFWAgreeStoreBinding.didAgree(env0_0.guild_id);
}
}
}
global.__d(_fun75342, 9618, [5073, 1878, 566, 2]) /* metro module 9618, dependencies: [5073, 1878, 566, 2] */;