1 import PropTypes from 'prop-types';
2 import React from 'react';
3 import { Col, Row } from 'react-bootstrap';
4 import { useTranslation } from 'react-i18next';
6 const GuessingWinner = ({ winner }) => {
7 const { t } = useTranslation();
9 const classNames = ['guessing-game-winner', 'my-2', 'p-2', 'border', 'rounded'];
11 classNames.push('no-points');
14 return <div className={classNames.join(' ')}>
17 <div>{winner.uname}</div>
18 <div>{t('twitchBot.guessingGame.winnerScore', { score: winner.score })}</div>
21 <div className="fs-3 text-end">{winner.guess}</div>
27 GuessingWinner.propTypes = {
28 winner: PropTypes.shape({
29 guess: PropTypes.string,
30 score: PropTypes.number,
31 uname: PropTypes.string,
35 export default GuessingWinner;