17 lines
415 B
Plaintext
17 lines
415 B
Plaintext
import * as React from "react";
|
|
const routerContext = React.createContext(null);
|
|
function getRouterContext() {
|
|
if (typeof document === "undefined") {
|
|
return routerContext;
|
|
}
|
|
if (window.__TSR_ROUTER_CONTEXT__) {
|
|
return window.__TSR_ROUTER_CONTEXT__;
|
|
}
|
|
window.__TSR_ROUTER_CONTEXT__ = routerContext;
|
|
return routerContext;
|
|
}
|
|
export {
|
|
getRouterContext
|
|
};
|
|
//# sourceMappingURL=routerContext.js.map
|