Delete unused DisconnectAll modal (#8599)
parent
d0fcf665bb
commit
320804bb71
@ -1,54 +0,0 @@ |
||||
import React, { PureComponent } from 'react' |
||||
import PropTypes from 'prop-types' |
||||
import Modal from '../../modal' |
||||
import Button from '../../../ui/button' |
||||
import { DEFAULT_ROUTE } from '../../../../helpers/constants/routes' |
||||
|
||||
export default class DisconnectAll extends PureComponent { |
||||
static propTypes = { |
||||
hideModal: PropTypes.func.isRequired, |
||||
disconnectAll: PropTypes.func.isRequired, |
||||
history: PropTypes.object.isRequired, |
||||
} |
||||
|
||||
static contextTypes = { |
||||
t: PropTypes.func, |
||||
} |
||||
|
||||
render () { |
||||
const { t } = this.context |
||||
const { hideModal, disconnectAll, history } = this.props |
||||
|
||||
return ( |
||||
<Modal |
||||
headerText={t('disconnectAllAccountsQuestion')} |
||||
onClose={() => hideModal()} |
||||
hideFooter |
||||
> |
||||
<div className="disconnect-all-modal"> |
||||
<div className="disconnect-all-modal__description"> |
||||
{ t('disconnectAllModalDescription') } |
||||
</div> |
||||
<Button |
||||
type="danger" |
||||
onClick={ () => { |
||||
disconnectAll() |
||||
hideModal() |
||||
history.push(DEFAULT_ROUTE) |
||||
}} |
||||
className="" |
||||
> |
||||
{ t('disconnectAll') } |
||||
</Button> |
||||
<Button |
||||
type="secondary" |
||||
onClick={ () => hideModal() } |
||||
className="disconnect-all-modal__cancel-button" |
||||
> |
||||
{ t('cancel') } |
||||
</Button> |
||||
</div> |
||||
</Modal> |
||||
) |
||||
} |
||||
} |
@ -1,20 +0,0 @@ |
||||
import { connect } from 'react-redux' |
||||
import { compose } from 'redux' |
||||
import { withRouter } from 'react-router-dom' |
||||
import withModalProps from '../../../../helpers/higher-order-components/with-modal-props' |
||||
import DisconnectAll from './disconnect-all.component' |
||||
import { clearPermissions } from '../../../../store/actions' |
||||
|
||||
const mapDispatchToProps = (dispatch) => { |
||||
return { |
||||
disconnectAll: () => { |
||||
dispatch(clearPermissions()) |
||||
}, |
||||
} |
||||
} |
||||
|
||||
export default compose( |
||||
withModalProps, |
||||
withRouter, |
||||
connect(null, mapDispatchToProps) |
||||
)(DisconnectAll) |
@ -1 +0,0 @@ |
||||
export { default } from './disconnect-all.container' |
@ -1,38 +0,0 @@ |
||||
.disconnect-all-modal { |
||||
height: 160px; |
||||
display: flex; |
||||
flex-direction: column; |
||||
justify-content: space-between; |
||||
|
||||
&__description { |
||||
color: #24292E; |
||||
margin-bottom: 24px; |
||||
} |
||||
|
||||
&__cancel-button { |
||||
border: none; |
||||
margin-top: 12px; |
||||
} |
||||
|
||||
.btn-secondary { |
||||
border: none; |
||||
} |
||||
} |
||||
|
||||
.disconnect-all-modal-container { |
||||
.modal-container__header-text { |
||||
font-family: Roboto; |
||||
font-style: normal; |
||||
font-weight: bold; |
||||
font-size: 18px; |
||||
color: #24292E; |
||||
} |
||||
|
||||
.modal-container__content { |
||||
padding-bottom: 18px; |
||||
|
||||
@media screen and (max-width: 575px) { |
||||
padding-bottom: 18px; |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue