decord/source/1615_ServerContainer.js

33 lines
1.1 KiB
JavaScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 1615
// Function ID: 1616
2026-08-06 08:05:19 +00:00
// Name: ServerContainer
2026-08-15 05:55:55 +00:00
// Dependencies: [19, 21, 1616, 1503]
2026-07-29 08:29:29 +00:00
2026-08-15 05:55:55 +00:00
// Module 1615 (ServerContainer)
2026-08-24 06:08:38 +00:00
import importAllResult from "noop" /* 19 */;
import { jsx } from "jsxProd" /* 21 */;
2026-07-29 08:29:29 +00:00
const require = arg1;
2026-08-06 08:05:19 +00:00
export const ServerContainer = importAllResult.forwardRef(function ServerContainer(arg0, fn) {
2026-07-29 08:29:29 +00:00
let obj;
({ children, location: _location } = arg0);
const effect = importAllResult.useEffect(() => {
console.error("'ServerContainer' should only be used on the server with 'react-dom/server' for SSR.");
}, []);
obj = {};
2026-08-04 21:03:28 +00:00
if (fn) {
2026-07-29 08:29:29 +00:00
obj = { getCurrentOptions: null };
obj[0] = function getCurrentOptions() {
return obj.options;
};
2026-08-04 21:03:28 +00:00
if (typeof fn === "function") {
fn(obj);
2026-07-29 08:29:29 +00:00
} else {
2026-08-04 21:03:28 +00:00
fn.current = obj;
2026-07-29 08:29:29 +00:00
}
}
2026-08-24 06:08:38 +00:00
obj = { value: { location: _location }, children: jsx(obj(1503).CurrentRenderContext.Provider, { value: obj, children }) };
return jsx(obj(1616).ServerContext.Provider, { value: { location: _location }, children: jsx(obj(1503).CurrentRenderContext.Provider, { value: obj, children }) });
2026-07-29 08:29:29 +00:00
});