]> git.localhorst.tv Git - alttp.git/blob - resources/js/components/tournament/ScoreChartDialog.js
958fcedea052786ca13f8d43d7e53ec0e1e03819
[alttp.git] / resources / js / components / tournament / ScoreChartDialog.js
1 import PropTypes from 'prop-types';
2 import React from 'react';
3 import { Button, Modal } from 'react-bootstrap';
4 import { withTranslation } from 'react-i18next';
5
6 import ScoreChart from './ScoreChart';
7 import i18n from '../../i18n';
8
9 const ScoreChartDialog = ({
10         onHide,
11         show,
12         tournament,
13 }) =>
14 <Modal className="score-chart-dialog" dialogClassName="modal-90w" onHide={onHide} show={show}>
15         <Modal.Header closeButton>
16                 <Modal.Title>
17                         {i18n.t('tournaments.scoreChart')}
18                 </Modal.Title>
19         </Modal.Header>
20         <Modal.Body style={{ height: '80vh' }}>
21                 <ScoreChart tournament={tournament} />
22         </Modal.Body>
23         <Modal.Footer>
24                 <Button onClick={onHide} variant="secondary">
25                         {i18n.t('button.close')}
26                 </Button>
27         </Modal.Footer>
28 </Modal>;
29
30 ScoreChartDialog.propTypes = {
31         onHide: PropTypes.func,
32         show: PropTypes.bool,
33         tournament: PropTypes.shape({
34         }),
35 };
36
37 export default withTranslation()(ScoreChartDialog);