]> git.localhorst.tv Git - alttp.git/blob - resources/js/components/episodes/ApplyDialog.js
svg dungeon tracker
[alttp.git] / resources / js / components / episodes / ApplyDialog.js
1 import PropTypes from 'prop-types';
2 import React from 'react';
3 import { Modal } from 'react-bootstrap';
4 import { useTranslation } from 'react-i18next';
5
6 import ApplyForm from './ApplyForm';
7
8 const ApplyDialog = ({
9         as,
10         episode,
11         onHide,
12         onSubmit,
13         show,
14 }) => {
15         const { t } = useTranslation();
16
17         return <Modal className="apply-dialog" onHide={onHide} show={show}>
18                 <Modal.Header closeButton>
19                         <Modal.Title>
20                                 {t('episodes.applyDialog.title')}
21                         </Modal.Title>
22                 </Modal.Header>
23                 <ApplyForm
24                         as={as}
25                         episode={episode}
26                         onCancel={onHide}
27                         onSubmit={onSubmit}
28                 />
29         </Modal>;
30 };
31
32 ApplyDialog.propTypes = {
33         as: PropTypes.string,
34         episode: PropTypes.shape({
35         }),
36         onHide: PropTypes.func,
37         onSubmit: PropTypes.func,
38         show: PropTypes.bool,
39 };
40
41 export default ApplyDialog;