Interactive interface for browsing global, full-resolution satellite imagery
Remove passed Image Download prop #1576
Benjamin King0ba0ed83bedc
diff --git a/web/js/containers/image-download.js b/web/js/containers/image-download.jsindex 3100f810d..f19b11b32 100644--- a/web/js/containers/image-download.js+++ b/web/js/containers/image-download.js@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';import { connect } from 'react-redux';import Panel from '../components/image-download/panel';import Crop from '../components/util/image-crop';+import { onToggle } from '../modules/modal/actions';import { debounce } from 'lodash';import * as olProj from 'ol/proj';@@ -131,7 +132,7 @@ class ImageDownloadContainer extends Component {}}-function mapStateToProps(state, ownProps) {+function mapStateToProps(state) {const { id } = state.projection;const { config, models } = state.models;let url = DEFAULT_URL;@@ -146,12 +147,19 @@ function mapStateToProps(state, ownProps) {return {projection: id,url,- models,- onClose: ownProps.onClose+ models};}+const mapDispatchToProps = dispatch => ({+ onClose: () => {+ dispatch(onToggle());+ }+});-export default connect(mapStateToProps)(ImageDownloadContainer);+export default connect(+ mapStateToProps,+ mapDispatchToProps+)(ImageDownloadContainer);ImageDownloadContainer.propTypes = {projection: PropTypes.string,diff --git a/web/js/containers/modal.js b/web/js/containers/modal.jsindex cb7fff6b7..b59495f78 100644--- a/web/js/containers/modal.js+++ b/web/js/containers/modal.js@@ -76,7 +76,7 @@ class ModalContainer extends Component {<ModalBody>{bodyHeader ? <h3>{bodyHeader}</h3> : ''}{BodyComponent ? (- <BodyComponent onClose={onToggle} />+ <BodyComponent />) : isTemplateModal ? (this.getTemplateBody()) : (