1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-05 07:24:56 +01:00
metamask-extension/ui/components/app/modals/transaction-confirmed/transaction-confirmed.component.js

43 lines
1015 B
JavaScript
Raw Normal View History

import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import Modal from '../../modal';
export default class TransactionConfirmed extends PureComponent {
static contextTypes = {
t: PropTypes.func,
};
static propTypes = {
onSubmit: PropTypes.func,
hideModal: PropTypes.func,
};
handleSubmit = () => {
const { hideModal, onSubmit } = this.props;
hideModal();
if (onSubmit && typeof onSubmit === 'function') {
onSubmit();
}
};
2020-11-03 00:41:28 +01:00
render() {
const { t } = this.context;
return (
2020-11-03 00:41:28 +01:00
<Modal onSubmit={this.handleSubmit} submitText={t('ok')}>
<div className="transaction-confirmed__content">
<img src="images/check-icon.svg" alt="" />
<div className="transaction-confirmed__title">
2020-11-03 00:41:28 +01:00
{`${t('confirmed')}!`}
</div>
<div className="transaction-confirmed__description">
2020-11-03 00:41:28 +01:00
{t('initialTransactionConfirmed')}
</div>
</div>
</Modal>
);
}
}