bpms_site/.svn/pristine/91/914180f631c6ae61c29d2dd7b278fa896de8956f.svn-base
2025-11-02 16:38:49 +03:30

9 lines
505 B
Plaintext

import React from 'react';
import type { BaseContext, NextComponentType, NextPageContext } from '../shared/lib/utils';
import type { NextRouter } from './router';
export type WithRouterProps = {
router: NextRouter;
};
export type ExcludeRouterProps<P> = Pick<P, Exclude<keyof P, keyof WithRouterProps>>;
export default function withRouter<P extends WithRouterProps, C extends BaseContext = NextPageContext>(ComposedComponent: NextComponentType<C, any, P>): React.ComponentType<ExcludeRouterProps<P>>;