Files
dashfront/src/components/withNavigate.jsx
2026-07-31 08:34:51 +02:00

10 lines
256 B
JavaScript

import { useNavigate } from 'react-router-dom';
export default function withNavigate(Wrapped) {
function NavigateWrapper(props) {
const navigate = useNavigate();
return <Wrapped {...props} navigate={navigate} />;
}
return NavigateWrapper;
}