decord/source/modules/self_mod/hooks/useUserIsTeen.tsx

26 lines
702 B
TypeScript
Raw Normal View History

// Module ID: 8714
// Function ID: 8715
2026-07-20 16:05:17 +00:00
// Name: useUserIsTeen
// Dependencies: [1371, 504, 2]
2026-07-20 16:05:17 +00:00
// Exports: useUserIsTeen
// Module 8714 (useUserIsTeen)
import initialize from "initialize" /* 504 */;
import UserStore from "UserStore" /* 1371 */;
2026-07-23 10:11:24 +00:00
require = fn;
const size = fn(2);
const result = size.fileFinishedImporting("modules/self_mod/hooks/useUserIsTeen.tsx");
2026-07-20 16:05:17 +00:00
export const useUserIsTeen = function useUserIsTeen() {
const items = [UserStore];
2026-08-24 06:08:38 +00:00
return false === initialize.useStateFromStores(items, () => {
2026-07-29 08:29:29 +00:00
currentUser = currentUser.getCurrentUser();
2026-07-20 16:05:17 +00:00
let nsfwAllowed;
2026-07-29 08:29:29 +00:00
if (currentUser != null) {
2026-07-20 16:05:17 +00:00
nsfwAllowed = currentUser.nsfwAllowed;
}
return nsfwAllowed;
});
};