import{useLocation,useNavigate,useParams}from'react-router-dom';// TODO: Tmp solution for legacy components, - remove when all components are migrated to hooks
functionwithRouter(Component){functionComponentWithRouterProp(props){constlocation=useLocation();constnavigate=useNavigate();constparams=useParams();return<Component{...props}router={{ location,navigate,params}}/>;
}
return ComponentWithRouterProp;
}
export default withRouter;