import { maySeeResults } from '../../helpers/permissions';
import { getRunners } from '../../helpers/Tournament';
import { compareResult } from '../../helpers/Result';
-import { withUser } from '../../helpers/UserContext';
+import { useUser } from '../../hooks/user';
+
+const List = ({ round, tournament }) => {
+ const { user } = useUser();
-const List = ({ round, tournament, user }) => {
if (tournament.type === 'open-async') {
const results = maySeeResults(user, tournament, round)
? (round.results || []).sort(compareResult)
users: PropTypes.arrayOf(PropTypes.shape({
})),
}),
- user: PropTypes.shape({
- }),
};
-export default withUser(List);
+export default List;