1 import PropTypes from 'prop-types';
2 import React from 'react';
3 import { Button, Modal } from 'react-bootstrap';
4 import { withTranslation } from 'react-i18next';
6 import Loading from '../common/Loading';
7 import i18n from '../../i18n';
9 const ScoreChart = React.lazy(() => import('./ScoreChart'));
11 const ScoreChartDialog = ({
16 <Modal className="score-chart-dialog" dialogClassName="modal-90w" onHide={onHide} show={show}>
17 <Modal.Header closeButton>
19 {i18n.t('tournaments.scoreChart')}
22 <Modal.Body style={{ height: '80vh' }}>
23 <React.Suspense fallback={<Loading />}>
24 <ScoreChart tournament={tournament} />
28 <Button onClick={onHide} variant="secondary">
29 {i18n.t('button.close')}
34 ScoreChartDialog.propTypes = {
35 onHide: PropTypes.func,
37 tournament: PropTypes.shape({
41 export default withTranslation()(ScoreChartDialog);