Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
55 lines
1.8 KiB
JavaScript
55 lines
1.8 KiB
JavaScript
// Module ID: 1577
|
|
// Function ID: 1578
|
|
// Dependencies: [32, 19, 1492, 1526, 1523, 1578, 1505]
|
|
// Exports: usePreventRemove
|
|
|
|
// Module 1577
|
|
import _slicedToArray from "module_32" /* 32 */;
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
const require = globalThis.__r;
|
|
|
|
const require = arg1;
|
|
|
|
export const usePreventRemove = function usePreventRemove(stateFromStores, arg1) {
|
|
_require = stateFromStores;
|
|
importDefault = arg1;
|
|
const first = navigation(key.useState(() => stateFromStores(first[2]).nanoid()), 1)[0];
|
|
navigation = require("module_1526").useNavigation();
|
|
let obj = require("module_1526");
|
|
key = require("module_1523").useRoute().key;
|
|
const obj2 = require("module_1523");
|
|
const preventRemoveContext = require("module_1578").usePreventRemoveContext();
|
|
const setPreventRemove = preventRemoveContext.setPreventRemove;
|
|
const notifyPreventRemove = preventRemoveContext.notifyPreventRemove;
|
|
const items = [setPreventRemove, first, key, stateFromStores];
|
|
const insertionEffect = key.useInsertionEffect(() => {
|
|
setPreventRemove(first, key, closure_0);
|
|
return () => {
|
|
setPreventRemove(first, key, false);
|
|
};
|
|
}, items);
|
|
const items1 = [first, key, stateFromStores, notifyPreventRemove];
|
|
const effect = key.useEffect(() => {
|
|
notifyPreventRemove();
|
|
return () => {
|
|
notifyPreventRemove();
|
|
};
|
|
}, items1);
|
|
const tmp6 = require("module_1505")((preventDefault) => {
|
|
if (closure_0) {
|
|
preventDefault.preventDefault();
|
|
const obj = { data: preventDefault.data };
|
|
closure_1(obj);
|
|
}
|
|
});
|
|
closure_7 = tmp6;
|
|
const items2 = [navigation, tmp6];
|
|
const effect1 = key.useEffect(() => {
|
|
let addListenerResult;
|
|
if (navigation != null) {
|
|
addListenerResult = navigation.addListener("beforeRemove", closure_7);
|
|
}
|
|
return addListenerResult;
|
|
}, items2);
|
|
};
|