diff options
author | Matthew Shao <me@matshao.com> | 2017-07-01 08:46:04 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-01 08:46:04 -0500 |
commit | f3231ed758324a7de465ee5a377f9c40b0a8df34 (patch) | |
tree | 3979c67de95b398e8d0c89034feee60a0d0a3bb6 /web/src/js/components/Modal/Modal.jsx | |
parent | 321352ef0bc1911d49c8b6f8537674b03fa92f70 (diff) | |
parent | aad0b95cbe65e97574d49f3933002d347470d1ef (diff) | |
download | mitmproxy-f3231ed758324a7de465ee5a377f9c40b0a8df34.tar.gz mitmproxy-f3231ed758324a7de465ee5a377f9c40b0a8df34.tar.bz2 mitmproxy-f3231ed758324a7de465ee5a377f9c40b0a8df34.zip |
Merge pull request #2416 from MatthewShao/mitmweb-options
[WIP] [web] Mitmweb options editor UI
Diffstat (limited to 'web/src/js/components/Modal/Modal.jsx')
-rw-r--r-- | web/src/js/components/Modal/Modal.jsx | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/web/src/js/components/Modal/Modal.jsx b/web/src/js/components/Modal/Modal.jsx new file mode 100644 index 00000000..88e81156 --- /dev/null +++ b/web/src/js/components/Modal/Modal.jsx @@ -0,0 +1,24 @@ +import React, { Component } from 'react' +import { connect } from 'react-redux' +import ModalList from './ModalList' + +class PureModal extends Component { + + constructor(props, context) { + super(props, context) + } + + render() { + const { activeModal } = this.props + const ActiveModal = ModalList.find(m => m.name === activeModal ) + return( + activeModal ? <ActiveModal/> : <div/> + ) + } +} + +export default connect( + state => ({ + activeModal: state.ui.modal.activeModal + }) +)(PureModal) |