decord/source/modules/captcha/useCaptchaModalEffects.tsx

47 lines
1.3 KiB
TypeScript
Raw Normal View History

2026-07-24 07:16:23 +00:00
// Module ID: 16010
// Function ID: 123611
2026-07-20 16:05:17 +00:00
// Name: useCaptchaModalEffects
2026-07-24 07:16:23 +00:00
// Dependencies: [31, 653, 4559, 9482, 675, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-24 07:16:23 +00:00
// Module 16010 (useCaptchaModalEffects)
2026-07-23 10:11:24 +00:00
import result from "result";
import { AnalyticEvents } from "ME";
const require = arg1;
const result = require("useMountLayoutEffect").fileFinishedImporting("modules/captcha/useCaptchaModalEffects.tsx");
2026-07-20 16:05:17 +00:00
export default function useCaptchaModalEffects(arg0) {
let analyticsType;
2026-07-23 10:11:24 +00:00
let require;
({ onReject: require, analyticsType } = arg0);
2026-07-20 16:05:17 +00:00
if (analyticsType === undefined) {
analyticsType = "Guild Join Captcha";
}
2026-07-23 10:11:24 +00:00
let dependencyMap;
dependencyMap = React.useRef(true);
analyticsType(4559)(() => () => {
if (outer1_2.current) {
if (null != outer1_0) {
outer1_0(outer2_0(table[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-07-23 10:11:24 +00:00
obj.track(outer1_4.OPEN_MODAL, obj);
2026-07-20 16:05:17 +00:00
return () => {
2026-07-23 10:11:24 +00:00
if (outer1_2.current) {
let obj = analyticsType(table[4]);
obj = { type: outer1_1 };
obj.track(outer2_4.MODAL_DISMISSED, obj);
2026-07-20 16:05:17 +00:00
}
};
}, items);
return () => {
closure_2.current = false;
};
};