Initial commit
This commit is contained in:
commit
78f8d225ee
21173 changed files with 2907774 additions and 0 deletions
20
node_modules/next/dist/esm/client/with-router.js
generated
vendored
Normal file
20
node_modules/next/dist/esm/client/with-router.js
generated
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue