1 import PropTypes from 'prop-types';
2 import React from 'react';
3 import { Alert, Button, Modal } from 'react-bootstrap';
4 import { withTranslation } from 'react-i18next';
6 import List from './List';
7 import i18n from '../../i18n';
9 const Dialog = ({ onHide, show, tournament }) =>
10 <Modal className="applications-dialog" onHide={onHide} show={show}>
11 <Modal.Header closeButton>
13 {i18n.t('tournaments.applications')}
16 <Modal.Body className="p-0">
17 {tournament.applications && tournament.applications.length ?
18 <List tournament={tournament} />
20 <Alert variant="info">
21 {i18n.t('tournaments.noApplications')}
26 <Button onClick={onHide} variant="secondary">
27 {i18n.t('button.close')}
33 onHide: PropTypes.func,
35 tournament: PropTypes.shape({
36 applications: PropTypes.arrayOf(PropTypes.shape({
41 export default withTranslation()(Dialog);