22 lines
677 B
JavaScript
22 lines
677 B
JavaScript
// Module ID: 1595
|
|
// Function ID: 1596
|
|
// Name: usePreventRemoveContext
|
|
// Dependencies: [19, 1570]
|
|
// Exports: usePreventRemoveContext
|
|
|
|
// Module 1595 (usePreventRemoveContext)
|
|
import PreventRemoveContext from "PreventRemoveContext" /* 1570 */;
|
|
import closure_2 from "noop" /* 19 */;
|
|
|
|
require = arg1;
|
|
|
|
export const usePreventRemoveContext = function usePreventRemoveContext() {
|
|
const context = React.useContext(PreventRemoveContext.PreventRemoveContext);
|
|
if (null == context) {
|
|
const _Error = Error;
|
|
error = new Error("Couldn't find the prevent remove context. Is your component inside NavigationContent?");
|
|
throw error;
|
|
} else {
|
|
return context;
|
|
}
|
|
};
|