2025-01-07 15:39:00 +03:00

8 lines
217 B
JavaScript

import { useParams } from 'react-router-dom';
export function withRouter(Children) {
return (props) => {
const match = { params: useParams() };
return <Children {...props} match={match} />
}
}