+import PropTypes from 'prop-types';
+import React, { useState } from 'react';
+import { Button } from 'react-bootstrap';
+import { withTranslation } from 'react-i18next';
+
+import EditDialog from './EditDialog';
+import Icon from '../common/Icon';
+import i18n from '../../i18n';
+
+const EditButton = ({
+ round,
+ tournament,
+}) => {
+ const [showDialog, setShowDialog] = useState(false);
+
+ return <>
+ <EditDialog
+ onHide={() => setShowDialog(false)}
+ round={round}
+ show={showDialog}
+ tournament={tournament}
+ />
+ <Button
+ onClick={() => setShowDialog(true)}
+ size="sm"
+ title={i18n.t('rounds.edit')}
+ variant="outline-secondary"
+ >
+ <Icon.EDIT title="" />
+ </Button>
+ </>;
+};
+
+EditButton.propTypes = {
+ round: PropTypes.shape({
+ locked: PropTypes.bool,
+ }),
+ tournament: PropTypes.shape({
+ }),
+};
+
+export default withTranslation()(EditButton);