1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-25 03:20:23 +01:00
metamask-extension/ui/app/components/modals/confirm-reset-account/confirm-reset-account.component.js

39 lines
884 B
JavaScript
Raw Normal View History

import React, { PureComponent } from 'react'
2018-05-31 01:17:40 +02:00
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,
}
static contextTypes = {
t: PropTypes.func,
}
handleReset = () => {
2018-05-31 01:17:40 +02:00
this.props.resetAccount()
.then(() => this.props.hideModal())
}
render () {
const { t } = this.context
return (
<Modal
onSubmit={this.handleReset}
onCancel={() => this.props.hideModal()}
submitText={t('reset')}
cancelText={t('nevermind')}
submitType="secondary"
>
<ModalContent
title={`${t('resetAccount')}?`}
description={t('resetAccountDescription')}
/>
</Modal>
2018-05-31 01:17:40 +02:00
)
}
}