import React from 'react'; import { connect } from 'react-redux'; import Icon from '../../components/Icon'; class Modal extends React.Component { componentDidMount() { $('body').addClass('modal-open'); } componentWillUnmount() { $('body').removeClass('modal-open'); } render() { const { extraControls = null, noclose = false, children, className = '', } = this.props; return (
{!noclose && (
window.history.back()}>
)} {extraControls}
{children}
); } } const mapStateToProps = (state, ownProps) => ({ shortkeys_enabled: state.ui.shortkeys_enabled, }); const mapDispatchToProps = (dispatch) => ({}); export default connect(mapStateToProps, mapDispatchToProps)(Modal);