decord/source/1594_usePreventRemoveContext.js

22 lines
627 B
JavaScript
Raw Normal View History

2026-08-11 06:20:06 +00:00
// Module ID: 1594
// Function ID: 1595
2026-08-06 08:05:19 +00:00
// Name: usePreventRemoveContext
2026-08-11 06:20:06 +00:00
// Dependencies: [19, 1569]
2026-08-06 08:05:19 +00:00
// Exports: usePreventRemoveContext
2026-08-11 06:20:06 +00:00
// Module 1594 (usePreventRemoveContext)
2026-08-06 08:05:19 +00:00
import noop from "noop";
const require = arg1;
export const usePreventRemoveContext = function usePreventRemoveContext() {
2026-08-11 06:20:06 +00:00
const context = React.useContext(require(1569) /* PreventRemoveContext */.PreventRemoveContext);
2026-08-06 08:05:19 +00:00
if (null == context) {
const _Error = Error;
const error = new Error("Couldn't find the prevent remove context. Is your component inside NavigationContent?");
throw error;
} else {
return context;
}
};