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

31 lines
860 B
TypeScript
Raw Normal View History

2026-07-24 07:16:23 +00:00
// Module ID: 13831
// Function ID: 105983
2026-07-20 16:05:17 +00:00
// Name: useRefreshLinkCodeOnExpiry
2026-07-24 07:16:23 +00:00
// Dependencies: [31, 8435, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-24 07:16:23 +00:00
// Module 13831 (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-24 07:16:23 +00:00
const tmp = importDefault(8435)(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);
};