import PropTypes from 'prop-types';
import React from 'react';
-import { Table } from 'react-bootstrap';
+import { Button, Table } from 'react-bootstrap';
import { withTranslation } from 'react-i18next';
+import Icon from '../common/Icon';
import Box from '../users/Box';
import { calculateScores } from '../../helpers/Tournament';
import i18n from '../../i18n';
<tbody>
{calculateScores(tournament).map(score =>
<tr className="score" key={score.participant.id}>
- <td><Box user={score.participant.user} /></td>
+ <td>
+ <div className="d-flex align-items-center justify-content-between">
+ <Box user={score.participant.user} />
+ {score.participant.user.stream_link ?
+ <Button
+ href={score.participant.user.stream_link}
+ size="sm"
+ target="_blank"
+ title={i18n.t('users.stream')}
+ variant="outline-twitch"
+ >
+ <Icon.STREAM title="" />
+ </Button>
+ : null}
+ </div>
+ </td>
<td className="text-end text-lg">{score.score}</td>
</tr>
)}