parent
bfcb73ad53
commit
226601a956
@ -1,39 +0,0 @@ |
|||||||
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> |
|
||||||
) |
|
||||||
} |
|
||||||
} |
|
@ -1,16 +0,0 @@ |
|||||||
import { connect } from 'react-redux' |
|
||||||
import { compose } from 'recompose' |
|
||||||
import withModalProps from '../../../higher-order-components/with-modal-props' |
|
||||||
import ForceInjectionComponent from './force-injection.component' |
|
||||||
import { forceInjection } from '../../../actions' |
|
||||||
|
|
||||||
const mapDispatchToProps = dispatch => { |
|
||||||
return { |
|
||||||
forceInjection: () => dispatch(forceInjection()), |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
export default compose( |
|
||||||
withModalProps, |
|
||||||
connect(null, mapDispatchToProps) |
|
||||||
)(ForceInjectionComponent) |
|
@ -1 +0,0 @@ |
|||||||
export { default } from './force-injection.container' |
|
Loading…
Reference in new issue