import PropTypes from 'prop-types'; import React, { PureComponent } from 'react'; import Modal from '../../modal'; export default class RejectTransactionsModal extends PureComponent { static contextTypes = { t: PropTypes.func.isRequired, }; static propTypes = { onSubmit: PropTypes.func.isRequired, hideModal: PropTypes.func.isRequired, unapprovedTxCount: PropTypes.number.isRequired, isRequestType: PropTypes.bool, }; onSubmit = async () => { const { onSubmit, hideModal } = this.props; await onSubmit(); hideModal(); }; render() { const { t } = this.context; const { hideModal, unapprovedTxCount, isRequestType } = this.props; return (
{isRequestType ? t('rejectRequestsDescription', [unapprovedTxCount]) : t('rejectTxsDescription', [unapprovedTxCount])}
); } }