decord/source/modules/captcha/useCaptchaModalEffects.tsx

46 lines
1.3 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 16628
// Function ID: 16629
2026-07-20 16:05:17 +00:00
// Name: useCaptchaModalEffects
2026-08-25 06:04:03 +00:00
// Dependencies: [19, 676, 4831, 10534, 698, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-25 06:04:03 +00:00
// Module 16628 (useCaptchaModalEffects)
2026-08-24 06:08:38 +00:00
import closure_3 from "noop" /* 19 */;
import { AnalyticEvents } from "ME" /* 676 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-08-24 06:08:38 +00:00
const result = require("set").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";
}
2026-08-24 06:08:38 +00:00
dependencyMap = undefined;
2026-07-23 10:11:24 +00:00
dependencyMap = React.useRef(true);
2026-08-25 06:04:03 +00:00
analyticsType(4831)(() => () => {
2026-07-29 08:29:29 +00:00
if (ref.current) {
if (closure_0 != null) {
2026-08-24 06:08:38 +00:00
tmp(closure_1_0(closure_1_2[3]).CaptchaError.CANCEL);
2026-07-20 16:05:17 +00:00
}
}
});
const items = [analyticsType];
const effect = React.useEffect(() => {
2026-07-23 10:11:24 +00:00
let obj = analyticsType(table[4]);
2026-07-20 16:05:17 +00:00
obj = { type: analyticsType };
2026-08-24 06:08:38 +00:00
obj.track(closure_1_4.OPEN_MODAL, obj);
2026-07-20 16:05:17 +00:00
return () => {
2026-07-29 08:29:29 +00:00
if (ref.current) {
2026-08-24 06:08:38 +00:00
let obj = closure_1_1(closure_1_2[4]);
2026-07-29 08:29:29 +00:00
obj = { type: null };
obj[0] = closure_1;
2026-08-24 06:08:38 +00:00
obj.track(closure_1_4.MODAL_DISMISSED, obj);
2026-07-20 16:05:17 +00:00
}
};
}, items);
return () => {
closure_2.current = false;
};
};