decord/source/__polyfill/07xxx/module_7934.js
github-actions e510164e6b chore: update source for alpha 346.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
2026-09-10 05:38:07 +00:00

34 lines
1.2 KiB
JavaScript

// Module ID: 7934
// Function ID: 7935
// Dependencies: [32, 19]
// Exports: useDismissedRouteError
// Module 7934
import _slicedToArray from "module_32" /* 32 */;
import noop from "module_19" /* 19 */;
export const useDismissedRouteError = function useDismissedRouteError(state) {
const setNextDismissedKey = _slicedToArray(noop.useState(null), 2);
const first = setNextDismissedKey[0];
let tmp3 = null;
if (first) {
const routes = state.routes;
const found = routes.find((key) => key.key === first);
let name;
if (found != null) {
name = found.name;
}
tmp3 = name;
}
name = tmp3;
const items = [tmp3];
const effect = noop.useEffect(() => {
if (name) {
const _HermesInternal = HermesInternal;
const _console = console;
console.error("The screen '" + tmp + "' was removed natively but didn't get removed from JS state. This can happen if the action was prevented in a 'beforeRemove' listener, which is not fully supported in native-stack.\n\nConsider using a 'usePreventRemove' hook with 'headerBackButtonMenuEnabled: false' to prevent users from natively going back multiple screens.");
}
}, items);
return { setNextDismissedKey: setNextDismissedKey[1] };
};