decord/source/8361_useInvalidPreventRemoveError.js

39 lines
1.1 KiB
JavaScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 8361
// Function ID: 8362
2026-07-22 07:54:56 +00:00
// Name: useInvalidPreventRemoveError
2026-07-29 08:29:29 +00:00
// Dependencies: [19, 1481]
2026-07-22 07:54:56 +00:00
// Exports: default
2026-08-05 07:35:12 +00:00
// Module 8361 (useInvalidPreventRemoveError)
2026-07-29 08:29:29 +00:00
import noop from "noop";
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-22 07:54:56 +00:00
export default function useInvalidPreventRemoveError(arg0) {
2026-07-23 10:11:24 +00:00
first = Object.keys(first(prop[1]).usePreventRemoveContext().preventedRoutes)[0];
prop = undefined;
2026-07-29 08:29:29 +00:00
if (arg0[first] != null) {
2026-07-22 07:54:56 +00:00
const options = tmp2.options;
2026-07-29 08:29:29 +00:00
if (options != null) {
2026-07-22 07:54:56 +00:00
prop = options.headerBackButtonMenuEnabled;
}
}
let name;
2026-07-29 08:29:29 +00:00
if (arg0[first] != null) {
2026-07-22 07:54:56 +00:00
const route = tmp2.route;
2026-07-29 08:29:29 +00:00
if (route != null) {
2026-07-22 07:54:56 +00:00
name = route.name;
}
}
const items = [first, prop, name];
2026-07-23 10:11:24 +00:00
const effect = name.useEffect(() => {
2026-07-22 07:54:56 +00:00
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);
};