闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
550 B

  1. import { openModal, closeModal } from '../actions/modal';
  2. import { connect } from 'react-redux';
  3. import DropdownMenu from '../components/dropdown_menu';
  4. import { isUserTouching } from '../is_mobile';
  5. const mapStateToProps = state => ({
  6. isModalOpen: state.get('modal').modalType === 'ACTIONS',
  7. });
  8. const mapDispatchToProps = dispatch => ({
  9. isUserTouching,
  10. onModalOpen: props => dispatch(openModal('ACTIONS', props)),
  11. onModalClose: () => dispatch(closeModal()),
  12. });
  13. export default connect(mapStateToProps, mapDispatchToProps)(DropdownMenu);