1 import PropTypes from 'prop-types';
2 import React from 'react';
3 import { Button } from 'react-bootstrap';
4 import { useTranslation } from 'react-i18next';
9 } from '../../helpers/Channel';
11 const GuessingGameControls = ({
18 const { t } = useTranslation();
21 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
22 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
26 <div className="button-bar mt-3">
29 variant={hasActiveGuessing(channel) ? 'success' : 'outline-success'}
36 hasActiveGuessing(channel) && isAcceptingGuesses(channel)
37 ? 'danger' : 'outline-danger'
45 variant={hasActiveGuessing(channel) ? 'secondary' : 'outline-secondary'}
50 {hasActiveGuessing(channel) ?
51 <div className="bkgg-buttons d-grid gap-3 my-3">
52 {solutions.map(solution =>
55 onClick={() => onSolve(solution)}
57 variant="outline-secondary"
67 GuessingGameControls.propTypes = {
68 channel: PropTypes.shape({
70 onCancel: PropTypes.func,
71 onSolve: PropTypes.func,
72 onStart: PropTypes.func,
73 onStop: PropTypes.func,
76 export default GuessingGameControls;