decord/source/modules/parent_tools/hooks/useRefreshLinkCodeOnExpiry.tsx

31 lines
860 B
TypeScript
Raw Normal View History

2026-07-28 08:39:19 +00:00
// Module ID: 13887
// Function ID: 106288
2026-07-20 16:05:17 +00:00
// Name: useRefreshLinkCodeOnExpiry
2026-07-28 08:39:19 +00:00
// Dependencies: [31, 8231, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-28 08:39:19 +00:00
// Module 13887 (useRefreshLinkCodeOnExpiry)
2026-07-23 10:11:24 +00:00
import result from "result";
const result = require("set").fileFinishedImporting("modules/parent_tools/hooks/useRefreshLinkCodeOnExpiry.tsx");
2026-07-20 16:05:17 +00:00
export default function useRefreshLinkCodeOnExpiry(arg0, arg1) {
const importDefault = arg0;
2026-07-28 08:39:19 +00:00
const tmp = importDefault(8231)(arg1);
2026-07-20 16:05:17 +00:00
const dependencyMap = tmp;
const items = [arg0, tmp];
const effect = React.useEffect(() => {
if (null != timeout) {
const _Date = Date;
const diff = timeout - Date.now();
if (diff <= 0) {
tmp();
} else {
const _setTimeout = setTimeout;
2026-07-23 10:11:24 +00:00
timeout = setTimeout(tmp, diff);
2026-07-20 16:05:17 +00:00
return () => clearTimeout(closure_0);
}
}
}, items);
};