1 import PropTypes from 'prop-types';
2 import React, { useState } from 'react';
3 import { Button } from 'react-bootstrap';
4 import { withTranslation } from 'react-i18next';
6 import SettingsDialog from './SettingsDialog';
7 import Icon from '../common/Icon';
8 import i18n from '../../i18n';
10 const SettingsButton = ({ tournament }) => {
11 const [showDialog, setShowDialog] = useState(false);
15 onClick={() => setShowDialog(true)}
16 title={i18n.t('button.settings')}
17 variant="outline-secondary"
19 <Icon.SETTINGS title="" />
22 onHide={() => setShowDialog(false)}
23 tournament={tournament}
29 SettingsButton.propTypes = {
30 tournament: PropTypes.shape({
34 export default withTranslation()(SettingsButton);