decord/source/modules/game_console/native/useShouldDisplayCancelConsoleTransfer.tsx

52 lines
1.4 KiB
TypeScript
Raw Normal View History

2026-09-03 10:05:34 +00:00
// Module ID: 17010
// Function ID: 17011
2026-07-29 08:29:29 +00:00
// Name: useShouldDisplayCancelConsoleTransfer
// Dependencies: [32, 19, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-09-03 10:05:34 +00:00
// Module 17010 (useShouldDisplayCancelConsoleTransfer)
2026-08-24 06:08:38 +00:00
import closure_0 from "_slicedToArray" /* 32 */;
import closure_1 from "noop" /* 19 */;
2026-07-23 10:11:24 +00:00
const result = require("set").fileFinishedImporting("modules/game_console/native/useShouldDisplayCancelConsoleTransfer.tsx");
2026-07-20 16:05:17 +00:00
export default function useShouldDisplayCancelConsoleTransfer(arg0) {
const callback = arg0;
2026-07-29 08:29:29 +00:00
const tmp = callback(React.useState(() => {
2026-08-24 06:08:38 +00:00
let tmp2 = null != closure_0;
2026-07-29 08:29:29 +00:00
if (tmp2) {
const _Date = Date;
tmp2 = Date.now() - tmp.startedAt > 6000;
}
return tmp2;
}), 2);
2026-07-23 10:11:24 +00:00
React = tmp[1];
2026-07-20 16:05:17 +00:00
const items = [arg0];
const effect = React.useEffect(() => {
2026-07-29 08:29:29 +00:00
let tmp2 = null != timeout;
if (tmp2) {
let _Date = Date;
tmp2 = Date.now() - tmp.startedAt > 6000;
}
callback(tmp2);
if (null != timeout) {
if (!tmp2) {
2026-07-20 16:05:17 +00:00
const _setTimeout = setTimeout;
2026-07-29 08:29:29 +00:00
const _Date2 = Date;
timeout = setTimeout(() => {
2026-08-24 06:08:38 +00:00
let tmp3 = null != closure_0;
2026-07-29 08:29:29 +00:00
if (tmp3) {
const _Date = Date;
tmp3 = Date.now() - tmp2.startedAt > 6000;
}
2026-08-24 06:08:38 +00:00
return closure_1(tmp3);
2026-07-29 08:29:29 +00:00
}, 6000 - (Date.now() - tmp.startedAt));
2026-07-20 16:05:17 +00:00
return () => {
2026-08-24 06:08:38 +00:00
clearTimeout(closure_0);
2026-07-20 16:05:17 +00:00
};
}
}
}, items);
return tmp[0];
};