logo

mastofe

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

privacy_dropdown_container.js (760B)


  1. import { connect } from 'react-redux';
  2. import PrivacyDropdown from '../components/privacy_dropdown';
  3. import { changeComposeVisibility } from '../../../actions/compose';
  4. import { openModal, closeModal } from '../../../actions/modal';
  5. import { isUserTouching } from '../../../is_mobile';
  6. const mapStateToProps = state => ({
  7. isModalOpen: state.get('modal').modalType === 'ACTIONS',
  8. value: state.getIn(['compose', 'privacy']),
  9. });
  10. const mapDispatchToProps = dispatch => ({
  11. onChange (value) {
  12. dispatch(changeComposeVisibility(value));
  13. },
  14. isUserTouching,
  15. onModalOpen: props => dispatch(openModal('ACTIONS', props)),
  16. onModalClose: () => dispatch(closeModal()),
  17. });
  18. export default connect(mapStateToProps, mapDispatchToProps)(PrivacyDropdown);