decord/source/1543_useNavigation.js

29 lines
892 B
JavaScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 1543
// Function ID: 1544
2026-08-06 08:05:19 +00:00
// Name: useNavigation
2026-08-15 05:55:55 +00:00
// Dependencies: [19, 1531, 1544]
2026-08-06 08:05:19 +00:00
// Exports: useNavigation
2026-08-15 05:55:55 +00:00
// Module 1543 (useNavigation)
2026-08-24 06:08:38 +00:00
import NavigationContainerRefContext from "NavigationContainerRefContext" /* 1531 */;
import NavigationContext from "NavigationContext" /* 1544 */;
import closure_2 from "noop" /* 19 */;
2026-08-06 08:05:19 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-08-06 08:05:19 +00:00
export const useNavigation = function useNavigation() {
2026-08-24 06:08:38 +00:00
const context = React.useContext(NavigationContainerRefContext.NavigationContainerRefContext);
let context1 = React.useContext(NavigationContext.NavigationContext);
2026-08-06 08:05:19 +00:00
if (undefined === context1) {
if (undefined === context) {
const _Error = Error;
2026-08-24 06:08:38 +00:00
error = new Error("Couldn't find a navigation object. Is your component inside NavigationContainer?");
2026-08-06 08:05:19 +00:00
throw error;
}
}
if (context1 == null) {
context1 = context;
}
return context1;
};