X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fcomponents%2Frounds%2FEditButton.js;fp=resources%2Fjs%2Fcomponents%2Frounds%2FEditButton.js;h=edc6fbf801cc440e4178fe1902d290e4ab964539;hb=4f4b2fd64141cbbff953881e2705602a00b85df5;hp=0000000000000000000000000000000000000000;hpb=33feb66adcce4897c9c92a0300ddcb45bc269da1;p=alttp.git diff --git a/resources/js/components/rounds/EditButton.js b/resources/js/components/rounds/EditButton.js new file mode 100644 index 0000000..edc6fbf --- /dev/null +++ b/resources/js/components/rounds/EditButton.js @@ -0,0 +1,42 @@ +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 <> + setShowDialog(false)} + round={round} + show={showDialog} + tournament={tournament} + /> + + ; +}; + +EditButton.propTypes = { + round: PropTypes.shape({ + locked: PropTypes.bool, + }), + tournament: PropTypes.shape({ + }), +}; + +export default withTranslation()(EditButton);