decord/source/modules/game_profile/hooks/useGameProfileObscured.tsx

36 lines
1.2 KiB
TypeScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 8419
2026-07-27 11:26:19 +00:00
// Function ID: 67260
2026-07-20 16:05:17 +00:00
// Name: isGameProfileObscured
2026-07-25 08:10:48 +00:00
// Dependencies: [1850, 7966, 566, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-25 08:10:48 +00:00
// Module 8419 (isGameProfileObscured)
2026-07-23 10:11:24 +00:00
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
const require = arg1;
2026-07-20 16:05:17 +00:00
function isGameProfileObscured(game, nsfwAllowed) {
let result = null != game;
if (result) {
result = false === nsfwAllowed;
}
if (result) {
2026-07-25 08:10:48 +00:00
result = require(7966) /* isAgeRestrictedContentClassification */.isAgeRestrictedContentClassification(game.contentClassification);
const obj = require(7966) /* isAgeRestrictedContentClassification */;
2026-07-20 16:05:17 +00:00
}
return result;
}
2026-07-23 10:11:24 +00:00
let result = require("initialize").fileFinishedImporting("modules/game_profile/hooks/useGameProfileObscured.tsx");
2026-07-20 16:05:17 +00:00
export default function useGameProfileObscured(game) {
2026-07-23 10:11:24 +00:00
const items = [_isNativeReflectConstruct];
return isGameProfileObscured(game, require(566) /* initialize */.useStateFromStores(items, () => {
const currentUser = outer1_2.getCurrentUser();
2026-07-20 16:05:17 +00:00
let nsfwAllowed;
if (null != currentUser) {
nsfwAllowed = currentUser.nsfwAllowed;
}
return nsfwAllowed;
}));
};
export { isGameProfileObscured };