decord/source/modules/game_console/native/useShouldDisplayCancelConsoleTransfer.tsx
github-actions 777dc50a28 chore: update source for alpha 346.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4790.js (118.4 MB)
2026-09-10 19:12:31 +00:00

52 lines
1.4 KiB
TypeScript

// Module ID: 17267
// Function ID: 17268
// Name: useShouldDisplayCancelConsoleTransfer
// Dependencies: [32, 19, 2]
// Exports: default
// Module 17267 (useShouldDisplayCancelConsoleTransfer)
import _slicedToArray from "module_32" /* 32 */;
import noop from "module_19" /* 19 */;
const size = fn(2);
const result = size.fileFinishedImporting("modules/game_console/native/useShouldDisplayCancelConsoleTransfer.tsx");
export default function useShouldDisplayCancelConsoleTransfer(arg0) {
closure_0 = arg0;
const tmp = _slicedToArray(noop.useState(() => {
let tmp2 = null != closure_0;
if (tmp2) {
const _Date = Date;
tmp2 = Date.now() - tmp.startedAt > 6000;
}
return tmp2;
}), 2);
closure_1 = tmp[1];
const items = [arg0];
const effect = noop.useEffect(() => {
let tmp2 = null != timeout;
if (tmp2) {
let _Date = Date;
tmp2 = Date.now() - tmp.startedAt > 6000;
}
closure_1(tmp2);
if (null != timeout) {
if (!tmp2) {
const _setTimeout = setTimeout;
const _Date2 = Date;
timeout = setTimeout(() => {
let tmp3 = null != closure_0;
if (tmp3) {
const _Date = Date;
tmp3 = Date.now() - tmp2.startedAt > 6000;
}
return closure_1_1(tmp3);
}, 6000 - (Date.now() - tmp.startedAt));
return () => {
clearTimeout(closure_0);
};
}
}
}, items);
return tmp[0];
};