decord/source/__polyfill/07xxx/module_7996.js
github-actions 4f02868c60 chore: update source for alpha 346.4
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4792.js (118.4 MB)
2026-09-11 10:30:06 +00:00

38 lines
1.2 KiB
JavaScript

// Module ID: 7996
// Function ID: 7997
// Dependencies: [19, 1484]
// Exports: useInvalidPreventRemoveError
// Module 7996
import Link from "Link" /* 1484 */;
import noop from "module_19" /* 19 */;
require = arg1;
export const useInvalidPreventRemoveError = function useInvalidPreventRemoveError(descriptors) {
const first = Object.keys(Link.usePreventRemoveContext().preventedRoutes)[0];
let prop;
if (descriptors[first] != null) {
const options = tmp2.options;
if (options != null) {
prop = options.headerBackButtonMenuEnabled;
}
}
let name;
if (descriptors[first] != null) {
const route = tmp2.route;
if (route != null) {
name = route.name;
}
}
const items = [first, prop, name];
const effect = noop.useEffect(() => {
if (null != first) {
if (prop) {
const _HermesInternal = HermesInternal;
const _console = console;
console.error("The screen " + name + " uses 'usePreventRemove' hook alongside 'headerBackButtonMenuEnabled: true', which is not supported. \n\nConsider removing 'headerBackButtonMenuEnabled: true' from " + name + " screen to get rid of this error.");
}
}
}, items);
};