logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

modal_container.js (429B)


  1. import { connect } from 'react-redux';
  2. import { closeModal } from '../../../actions/modal';
  3. import ModalRoot from '../components/modal_root';
  4. const mapStateToProps = state => ({
  5. type: state.get('modal').modalType,
  6. props: state.get('modal').modalProps,
  7. });
  8. const mapDispatchToProps = dispatch => ({
  9. onClose () {
  10. dispatch(closeModal());
  11. },
  12. });
  13. export default connect(mapStateToProps, mapDispatchToProps)(ModalRoot);