decord/source/modules/captcha/useCaptchaModalEffects.tsx

46 lines
1.3 KiB
TypeScript
Raw Normal View History

// Module ID: 17496
// Function ID: 17497
2026-07-20 16:05:17 +00:00
// Name: useCaptchaModalEffects
// Dependencies: [19, 1074, 5077, 11423, 1241, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 17496 (useCaptchaModalEffects)
import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1241 */;
import noop from "module_19" /* 19 */;
2026-07-23 10:11:24 +00:00
const require = globalThis.__r;
const require = fn;
const AnalyticEvents = fn(1074).AnalyticEvents;
const size = fn(2);
const result = size.fileFinishedImporting("modules/captcha/useCaptchaModalEffects.tsx");
2026-07-20 16:05:17 +00:00
export default function useCaptchaModalEffects(arg0) {
2026-07-23 10:11:24 +00:00
({ onReject: require, analyticsType } = arg0);
2026-07-20 16:05:17 +00:00
if (analyticsType === undefined) {
analyticsType = "Guild Join Captcha";
}
dependencyMap = noop.useRef(true);
analyticsType(5077)(() => () => {
2026-07-29 08:29:29 +00:00
if (ref.current) {
if (closure_1_0 != null) {
tmp(require("SharedCaptchaUtils").CaptchaError.CANCEL);
2026-07-20 16:05:17 +00:00
}
}
});
const items = [analyticsType];
const effect = noop.useEffect(() => {
AnalyticsUtilsDefault.track(AnalyticEvents.OPEN_MODAL, { type: analyticsType });
2026-07-20 16:05:17 +00:00
return () => {
2026-07-29 08:29:29 +00:00
if (ref.current) {
const obj2 = { type };
analyticsType(ref[4]).track(constants.MODAL_DISMISSED, obj2);
const obj = analyticsType(ref[4]);
2026-07-20 16:05:17 +00:00
}
};
}, items);
return () => {
closure_2.current = false;
};
};