decord/source/1595_usePreventRemoveContext.js

22 lines
627 B
JavaScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 1595
// Function ID: 1596
2026-08-06 08:05:19 +00:00
// Name: usePreventRemoveContext
2026-08-15 05:55:55 +00:00
// Dependencies: [19, 1570]
2026-08-06 08:05:19 +00:00
// Exports: usePreventRemoveContext
2026-08-15 05:55:55 +00:00
// Module 1595 (usePreventRemoveContext)
2026-08-06 08:05:19 +00:00
import noop from "noop";
const require = arg1;
export const usePreventRemoveContext = function usePreventRemoveContext() {
2026-08-15 05:55:55 +00:00
const context = React.useContext(require(1570) /* 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;
}
};