mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-26 12:29:06 +01:00
319696b4ef
* Added compliance details modal and compliance details component * Finished component * Fixed test name
37 lines
1021 B
JavaScript
37 lines
1021 B
JavaScript
import PropTypes from 'prop-types';
|
|
import React, { useContext } from 'react';
|
|
import { useDispatch } from 'react-redux';
|
|
import Modal from '../../app/modal';
|
|
import { hideModal } from '../../../store/actions';
|
|
import ComplianceDetails from '../compliance-details';
|
|
import { I18nContext } from '../../../contexts/i18n';
|
|
|
|
export default function ComplianceDetailsModal({
|
|
onGenerateComplianceReport,
|
|
reportAddress,
|
|
}) {
|
|
const dispatch = useDispatch();
|
|
const handleClose = () => dispatch(hideModal);
|
|
const t = useContext(I18nContext);
|
|
|
|
return (
|
|
<Modal
|
|
headerText={t('amlCompliance')}
|
|
hideFooter="true"
|
|
onClose={handleClose}
|
|
contentClass="compliance-details-modal-content"
|
|
>
|
|
<ComplianceDetails
|
|
address={reportAddress}
|
|
onClose={handleClose}
|
|
onGenerate={onGenerateComplianceReport}
|
|
/>
|
|
</Modal>
|
|
);
|
|
}
|
|
|
|
ComplianceDetailsModal.propTypes = {
|
|
reportAddress: PropTypes.func.isRequired,
|
|
onGenerateComplianceReport: PropTypes.func.isRequired,
|
|
};
|