1 import PropTypes from 'prop-types';
2 import React from 'react';
3 import { withTranslation } from 'react-i18next';
5 import Box from '../users/Box';
6 import { formatTime } from '../../helpers/Result';
7 import { findResult } from '../../helpers/Participant';
8 import i18n from '../../i18n';
14 const result = findResult(participant, round);
16 <div className="result">
17 <Box user={participant.user} />
20 <span>{i18n.t('results.time', { time: formatTime(result) })}</span>
28 participant: PropTypes.shape({
29 user: PropTypes.shape({
32 round: PropTypes.shape({
34 tournament: PropTypes.shape({
36 user: PropTypes.shape({
40 export default withTranslation()(Item);