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 EditDialog from './EditDialog';
7 import Icon from '../common/Icon';
8 import i18n from '../../i18n';
14 const [showDialog, setShowDialog] = useState(false);
18 onHide={() => setShowDialog(false)}
21 tournament={tournament}
24 onClick={() => setShowDialog(true)}
26 title={i18n.t('rounds.edit')}
27 variant="outline-secondary"
29 <Icon.EDIT title="" />
34 EditButton.propTypes = {
35 round: PropTypes.shape({
36 locked: PropTypes.bool,
38 tournament: PropTypes.shape({
42 export default withTranslation()(EditButton);