1 | import * as React from 'react';
|
2 | import PreventRemoveContext from './PreventRemoveContext';
|
3 | export default function usePreventRemoveContext() {
|
4 | const value = React.useContext(PreventRemoveContext);
|
5 |
|
6 | if (value == null) {
|
7 | throw new Error("Couldn't find the prevent remove context. Is your component inside NavigationContent?");
|
8 | }
|
9 |
|
10 | return value;
|
11 | }
|
12 | //# sourceMappingURL=usePreventRemoveContext.js.map |
\ | No newline at end of file |