diff --git a/src/Home/components/Modal.jsx b/src/Home/components/Modal.jsx index 9da8bc8..7aa94e6 100644 --- a/src/Home/components/Modal.jsx +++ b/src/Home/components/Modal.jsx @@ -44,22 +44,21 @@ class SimpleModal extends React.Component { }; handleClose = () => { + this.props.handleOpen(false); this.setState({ open: false }); }; + componentWillReceiveProps(nextProps){ + if(nextProps.open !== this.props.open){ + this.setState({ open : nextProps.open }); + } + } + render() { const { classes } = this.props; - + console.log(this.state.open,'this.state.open in modal STATE') return (