mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
40 lines
882 B
JavaScript
40 lines
882 B
JavaScript
import React, { PureComponent } from 'react'
|
|
import PropTypes from 'prop-types'
|
|
import Modal, { ModalContent } from '../../modal'
|
|
|
|
export default class ForceInjection extends PureComponent {
|
|
static propTypes = {
|
|
hideModal: PropTypes.func.isRequired,
|
|
forceInjection: PropTypes.func.isRequired,
|
|
}
|
|
|
|
static contextTypes = {
|
|
t: PropTypes.func,
|
|
}
|
|
|
|
handleForce = () => {
|
|
const { forceInjection, hideModal } = this.props
|
|
forceInjection()
|
|
hideModal()
|
|
}
|
|
|
|
render () {
|
|
const { t } = this.context
|
|
|
|
return (
|
|
<Modal
|
|
onSubmit={this.handleForce}
|
|
onCancel={() => this.props.hideModal()}
|
|
submitText={t('ok')}
|
|
cancelText={t('nevermind')}
|
|
submitType="secondary"
|
|
>
|
|
<ModalContent
|
|
title={t('exposeAccounts')}
|
|
description={t('confirmExpose')}
|
|
/>
|
|
</Modal>
|
|
)
|
|
}
|
|
}
|