decord/source/1531_usePreventRemoveContext.js

21 lines
528 B
JavaScript
Raw Normal View History

2026-07-20 16:05:17 +00:00
// Module ID: 1531
2026-07-25 08:10:48 +00:00
// Function ID: 17516
2026-07-20 16:05:17 +00:00
// Name: usePreventRemoveContext
2026-07-23 10:11:24 +00:00
// Dependencies: [31, 1503]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 1531 (usePreventRemoveContext)
2026-07-23 10:11:24 +00:00
import result from "result";
2026-07-20 16:05:17 +00:00
export default function usePreventRemoveContext() {
2026-07-23 10:11:24 +00:00
const context = React.useContext(importDefault(1503));
2026-07-20 16:05:17 +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;
}
};