decord/alpha/source/modules/badges/useShowBadgePersonalizationNotice.tsx
github-actions c6aa9eb120 chore: update source for alpha 349.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5030.js (118.4 MB)
2026-10-01 06:55:13 +00:00

22 lines
897 B
TypeScript

// Module ID: 10871
// Function ID: 10872
// Name: useShowBadgePersonalizationNotice
// Dependencies: [6198, 1074, 504, 10859, 2]
// Exports: default
// Module 10871 (useShowBadgePersonalizationNotice)
import initialize from "initialize" /* 504 */;
import BadgeUtils from "BadgeUtils" /* 10859 */;
import ConsentStore from "ConsentStore" /* 6198 */;
require = fn;
const Consents = fn(1074).Consents;
const size = fn(2);
const result = size.fileFinishedImporting("modules/badges/useShowBadgePersonalizationNotice.tsx");
export default function useShowBadgePersonalizationNotice(arg0) {
({ badge, isViewingOtherUser } = arg0);
const items = [ConsentStore];
const stateFromStores = initialize.useStateFromStores(items, () => ConsentStore.hasConsented(constants.PERSONALIZATION));
return BadgeUtils.isPersonalizationGatedBadge(badge.badge_id) && !isViewingOtherUser && !stateFromStores;
};