Files
PascalSchattenburg d147843c76 feat(blog): add file-based blog with dynamic slugs, MDX content and layout shell
- Introduced blog routing using Next.js App Router
- Implemented dynamic [slug] pages for blog posts
- Added MDX-based content loading via lib/posts
- Integrated shared TopBar layout with navigation
- Established clear content, lib and component separation
2026-01-22 14:14:15 +01:00

20 lines
776 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