]> git.localhorst.tv Git - alttp.git/blobdiff - resources/js/components/rounds/SeedDialog.js
allow setting seeds
[alttp.git] / resources / js / components / rounds / SeedDialog.js
diff --git a/resources/js/components/rounds/SeedDialog.js b/resources/js/components/rounds/SeedDialog.js
new file mode 100644 (file)
index 0000000..c4db7d3
--- /dev/null
@@ -0,0 +1,37 @@
+import PropTypes from 'prop-types';
+import React from 'react';
+import { Modal } from 'react-bootstrap';
+import { withTranslation } from 'react-i18next';
+
+import SeedForm from './SeedForm';
+import i18n from '../../i18n';
+
+const SeedDialog = ({
+       onHide,
+       participant,
+       round,
+       show,
+}) =>
+<Modal className="seed-dialog" onHide={onHide} show={show}>
+       <Modal.Header closeButton>
+               <Modal.Title>
+                       {i18n.t('rounds.setSeed')}
+               </Modal.Title>
+       </Modal.Header>
+       <SeedForm
+               onCancel={onHide}
+               participant={participant}
+               round={round}
+       />
+</Modal>;
+
+SeedDialog.propTypes = {
+       onHide: PropTypes.func,
+       round: PropTypes.shape({
+       }),
+       show: PropTypes.bool,
+       tournament: PropTypes.shape({
+       }),
+};
+
+export default withTranslation()(SeedDialog);