diff options
author | Matthew Shao <me@matshao.com> | 2017-06-30 20:46:02 +0800 |
---|---|---|
committer | Matthew Shao <me@matshao.com> | 2017-06-30 20:46:02 +0800 |
commit | 7baf3069b169e8196e5d389e655a3a187b4329d9 (patch) | |
tree | 131b6b04894d05ed1b19a6cc45ea72ac728b41e9 /web/src/js/components/Modal/Modal.jsx | |
parent | 7a50301af322667faff8adc1d5990957df9dc4bb (diff) | |
download | mitmproxy-7baf3069b169e8196e5d389e655a3a187b4329d9.tar.gz mitmproxy-7baf3069b169e8196e5d389e655a3a187b4329d9.tar.bz2 mitmproxy-7baf3069b169e8196e5d389e655a3a187b4329d9.zip |
[web] Update the Structure of Modal component.
Diffstat (limited to 'web/src/js/components/Modal/Modal.jsx')
-rw-r--r-- | web/src/js/components/Modal/Modal.jsx | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/web/src/js/components/Modal/Modal.jsx b/web/src/js/components/Modal/Modal.jsx index e39f5415..88e81156 100644 --- a/web/src/js/components/Modal/Modal.jsx +++ b/web/src/js/components/Modal/Modal.jsx @@ -1,6 +1,5 @@ import React, { Component } from 'react' import { connect } from 'react-redux' -import * as modalAction from '../../ducks/ui/modal' import ModalList from './ModalList' class PureModal extends Component { @@ -10,15 +9,10 @@ class PureModal extends Component { } render() { - const { activeModal, hideModal } = this.props + const { activeModal } = this.props const ActiveModal = ModalList.find(m => m.name === activeModal ) return( - activeModal ? - <div> - <div className="modal-backdrop fade in"></div> - <ActiveModal hideModal={ hideModal }/> - </div> - : <div/> + activeModal ? <ActiveModal/> : <div/> ) } } @@ -26,8 +20,5 @@ class PureModal extends Component { export default connect( state => ({ activeModal: state.ui.modal.activeModal - }), - { - hideModal: modalAction.hideModal - } + }) )(PureModal) |