decord/source/1526_NavigationContent.js

33 lines
843 B
JavaScript
Raw Normal View History

2026-07-20 16:05:17 +00:00
// Module ID: 1526
2026-07-25 08:10:48 +00:00
// Function ID: 17494
2026-07-20 16:05:17 +00:00
// Name: NavigationContent
2026-07-23 10:11:24 +00:00
// Dependencies: [31, 33]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 1526 (NavigationContent)
2026-07-23 10:11:24 +00:00
import result from "result";
import { jsx } from "jsxProd";
2026-07-20 16:05:17 +00:00
function NavigationContent(render) {
return render.render(render.children);
}
export default function useComponent(current) {
2026-07-23 10:11:24 +00:00
ref = ref.useRef(current);
2026-07-20 16:05:17 +00:00
ref.current = current;
2026-07-23 10:11:24 +00:00
const effect = ref.useEffect(() => {
2026-07-20 16:05:17 +00:00
ref.current = null;
});
2026-07-23 10:11:24 +00:00
return ref.useRef((arg0) => {
2026-07-20 16:05:17 +00:00
const current = ref.current;
if (null === current) {
const _Error = Error;
const error = new Error("The returned component must be rendered in the same render phase as the hook.");
throw error;
} else {
const obj = { render: current, children: tmp };
2026-07-23 10:11:24 +00:00
return outer1_1(outer1_2, obj);
2026-07-20 16:05:17 +00:00
}
}).current;
};