Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5051.js (118.4 MB)
41 lines
964 B
TypeScript
41 lines
964 B
TypeScript
// Module ID: 16605
|
|
// Function ID: 16606
|
|
// Name: useDelayedReveal
|
|
// Dependencies: [32, 19, 2]
|
|
// Exports: default
|
|
|
|
// Module 16605 (useDelayedReveal)
|
|
import _slicedToArray from "module_32" /* 32 */;
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/vibegrations/lib/useDelayedReveal.tsx");
|
|
|
|
export default function useDelayedReveal(arg0, arg1) {
|
|
let tmp = arg0;
|
|
closure_0 = arg0;
|
|
closure_1 = arg1;
|
|
[first] = noop.useState(arg0);
|
|
closure_3 = tmp4;
|
|
let tmp5 = !arg0;
|
|
if (!arg0) {
|
|
tmp5 = first;
|
|
}
|
|
if (tmp5) {
|
|
tmp4(false);
|
|
}
|
|
const items = [tmp, first, arg1];
|
|
const effect = noop.useEffect(() => {
|
|
if (timeout) {
|
|
if (!first) {
|
|
const _window = window;
|
|
timeout = window.setTimeout(() => closure_1_3(true), closure_1);
|
|
return () => window.clearTimeout(closure_0);
|
|
}
|
|
}
|
|
}, items);
|
|
if (tmp) {
|
|
tmp = first;
|
|
}
|
|
return tmp;
|
|
};
|