]> git.localhorst.tv Git - alttp.git/blob - resources/js/components/twitch-bot/GuessingGuess.js
adlib chat
[alttp.git] / resources / js / components / twitch-bot / GuessingGuess.js
1 import PropTypes from 'prop-types';
2 import React from 'react';
3 import { Col, Row } from 'react-bootstrap';
4 import { useTranslation } from 'react-i18next';
5
6 const GuessingGuess = ({ guess }) => {
7         const { t } = useTranslation();
8
9         return <div className="my-2 p-2 border rounded">
10                 <Row>
11                         <Col xs={6}>
12                                 <div>{guess.uname}</div>
13                                 <div className="text-muted">
14                                         {t('twitchBot.guessingGame.guessTimestamp', {
15                                                 timestamp: new Date(guess.created_at),
16                                         })}
17                                 </div>
18                         </Col>
19                         <Col xs={6}>
20                                 <div className="fs-3 text-end">{guess.guess}</div>
21                         </Col>
22                 </Row>
23         </div>;
24 };
25
26 GuessingGuess.propTypes = {
27         guess: PropTypes.shape({
28                 created_at: PropTypes.string,
29                 guess: PropTypes.string,
30                 uname: PropTypes.string,
31         }),
32 };
33
34 export default GuessingGuess;