2026-09-11 10:30:06 +00:00
|
|
|
// Module ID: 13520
|
|
|
|
|
// Function ID: 13521
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: useScheduledForcedUpdate
|
2026-09-11 10:30:06 +00:00
|
|
|
// Dependencies: [19, 7514, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: default
|
|
|
|
|
|
2026-09-11 10:30:06 +00:00
|
|
|
// Module 13520 (useScheduledForcedUpdate)
|
|
|
|
|
import areHookInputsEqual from "areHookInputsEqual" /* 7514 */;
|
2026-09-10 05:38:07 +00:00
|
|
|
import noop from "module_19" /* 19 */;
|
2026-07-23 10:11:24 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
require = fn;
|
|
|
|
|
const size = fn(2);
|
|
|
|
|
const result = size.fileFinishedImporting("modules/premium/hooks/useScheduledForcedUpdate.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export default function useScheduledForcedUpdate(delay) {
|
|
|
|
|
delay = delay.delay;
|
|
|
|
|
let flag = delay.disable;
|
|
|
|
|
if (flag === undefined) {
|
|
|
|
|
flag = false;
|
|
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
const forceUpdate = areHookInputsEqual.useForceUpdate();
|
2026-07-20 16:05:17 +00:00
|
|
|
const items = [delay, flag, forceUpdate];
|
2026-09-10 05:38:07 +00:00
|
|
|
const effect = noop.useEffect(() => {
|
2026-07-20 16:05:17 +00:00
|
|
|
if (timeout > 0) {
|
|
|
|
|
if (!flag) {
|
|
|
|
|
const _setTimeout = setTimeout;
|
2026-07-23 10:11:24 +00:00
|
|
|
timeout = setTimeout(() => {
|
2026-09-10 05:38:07 +00:00
|
|
|
forceUpdate();
|
2026-07-29 08:29:29 +00:00
|
|
|
}, tmp);
|
2026-07-20 16:05:17 +00:00
|
|
|
return () => clearTimeout(closure_0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, items);
|
|
|
|
|
};
|