aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/util/WithParams.tsx
blob: 6fc0957ffbc6c358f93f29608f0d6243fd093338 (plain) (blame)
1
2
3
4
5
6
7
8
import { useParams } from 'react-router-dom';

export default function withParams(Component: any) {
  return (props: any) => {
    const params = useParams();
    return <Component {...props} params={params} />;
  };
}