1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-29 15:50:28 +01:00
metamask-extension/ui/components/app/modals/confirm-reset-account/confirm-reset-account.component.js

38 lines
892 B
JavaScript
Raw Normal View History

import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import Modal, { ModalContent } from '../../modal';
2018-05-31 01:17:40 +02:00
export default class ConfirmResetAccount extends PureComponent {
2018-05-31 01:17:40 +02:00
static propTypes = {
hideModal: PropTypes.func.isRequired,
resetAccount: PropTypes.func.isRequired,
};
2018-05-31 01:17:40 +02:00
static contextTypes = {
t: PropTypes.func,
};
2018-05-31 01:17:40 +02:00
handleReset = () => {
this.props.resetAccount().then(() => this.props.hideModal());
};
2018-05-31 01:17:40 +02:00
2020-11-03 00:41:28 +01:00
render() {
const { t } = this.context;
2018-05-31 01:17:40 +02:00
return (
<Modal
onSubmit={this.handleReset}
onCancel={() => this.props.hideModal()}
submitText={t('clear')}
cancelText={t('nevermind')}
submitType="danger-primary"
>
<ModalContent
title={`${t('clearActivity')}?`}
description={t('clearActivityDescription')}
/>
</Modal>
);
2018-05-31 01:17:40 +02:00
}
}