decord/source/__polyfill/01xxx/module_1565.js
github-actions e510164e6b chore: update source for alpha 346.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
2026-09-10 05:38:07 +00:00

33 lines
982 B
JavaScript

// Module ID: 1565
// Function ID: 1566
// Dependencies: [19, 1513]
// Exports: useOnRouteFocus
// Module 1565
import NavigationBuilderContext from "NavigationBuilderContext" /* 1513 */;
import noop from "module_19" /* 19 */;
require = arg1;
export const useOnRouteFocus = function useOnRouteFocus(router) {
router = router.router;
const getState = router.getState;
const key = router.key;
const setState = router.setState;
const onRouteFocus = noop.useContext(NavigationBuilderContext.NavigationBuilderContext).onRouteFocus;
const items = [getState, onRouteFocus, router, setState, key];
return noop.useCallback((arg0) => {
const tmp = getState();
const stateForRouteFocus = router.getStateForRouteFocus(tmp, arg0);
if (stateForRouteFocus !== tmp) {
setState(stateForRouteFocus);
}
let tmp6 = undefined !== onRouteFocus;
if (tmp6) {
tmp6 = undefined !== key;
}
if (tmp6) {
onRouteFocus(key);
}
}, items);
};