aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/modals/confirm-reset-account/confirm-reset-account.component.js
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2018-06-02 07:03:56 +0800
committerGitHub <noreply@github.com>2018-06-02 07:03:56 +0800
commit4be8e780cd64014d07c036c29faa77f947437c4a (patch)
tree37c76b1bbad225adc70f45a8fd17e8718e2b6453 /ui/app/components/modals/confirm-reset-account/confirm-reset-account.component.js
parentdc5477be3cc62dff912a9447c702edab66200f02 (diff)
parentb1b90a6bb979cbda8b865e680dba621201d9f801 (diff)
downloadtangerine-wallet-browser-4be8e780cd64014d07c036c29faa77f947437c4a.tar.gz
tangerine-wallet-browser-4be8e780cd64014d07c036c29faa77f947437c4a.tar.zst
tangerine-wallet-browser-4be8e780cd64014d07c036c29faa77f947437c4a.zip
Merge pull request #4449 from MetaMask/Version-4.7.1
Version 4.7.1
Diffstat (limited to 'ui/app/components/modals/confirm-reset-account/confirm-reset-account.component.js')
-rw-r--r--ui/app/components/modals/confirm-reset-account/confirm-reset-account.component.js54
1 files changed, 54 insertions, 0 deletions
diff --git a/ui/app/components/modals/confirm-reset-account/confirm-reset-account.component.js b/ui/app/components/modals/confirm-reset-account/confirm-reset-account.component.js
new file mode 100644
index 000000000..14a4da62a
--- /dev/null
+++ b/ui/app/components/modals/confirm-reset-account/confirm-reset-account.component.js
@@ -0,0 +1,54 @@
+import React, { Component } from 'react'
+import PropTypes from 'prop-types'
+import Button from '../../button'
+
+class ConfirmResetAccount extends Component {
+ static propTypes = {
+ hideModal: PropTypes.func.isRequired,
+ resetAccount: PropTypes.func.isRequired,
+ }
+
+ static contextTypes = {
+ t: PropTypes.func,
+ }
+
+ handleReset () {
+ this.props.resetAccount()
+ .then(() => this.props.hideModal())
+ }
+
+ render () {
+ const { t } = this.context
+
+ return (
+ <div className="modal-container">
+ <div className="modal-container__content">
+ <div className="modal-container__title">
+ { `${t('resetAccount')}?` }
+ </div>
+ <div className="modal-container__description">
+ { t('resetAccountDescription') }
+ </div>
+ </div>
+ <div className="modal-container__footer">
+ <Button
+ type="default"
+ className="modal-container__footer-button"
+ onClick={() => this.props.hideModal()}
+ >
+ { t('nevermind') }
+ </Button>
+ <Button
+ type="secondary"
+ className="modal-container__footer-button"
+ onClick={() => this.handleReset()}
+ >
+ { t('reset') }
+ </Button>
+ </div>
+ </div>
+ )
+ }
+}
+
+export default ConfirmResetAccount