This repository has been archived on 2025-07-07. You can view files and clone it, but cannot push or open issues or pull requests.
Files
eternos/frontend/style/node_modules/next/dist/esm/client/with-router.js
2025-01-11 09:54:09 +03:00

20 lines
781 B
JavaScript

import { jsx as _jsx } from "react/jsx-runtime";
import React from "react";
import { useRouter } from "./router";
export default function withRouter(ComposedComponent) {
function WithRouterWrapper(props) {
return /*#__PURE__*/ _jsx(ComposedComponent, {
router: useRouter(),
...props
});
}
WithRouterWrapper.getInitialProps = ComposedComponent.getInitialProps;
WithRouterWrapper.origGetInitialProps = ComposedComponent.origGetInitialProps;
if (process.env.NODE_ENV !== "production") {
const name = ComposedComponent.displayName || ComposedComponent.name || "Unknown";
WithRouterWrapper.displayName = "withRouter(" + name + ")";
}
return WithRouterWrapper;
}
//# sourceMappingURL=with-router.js.map