07b46cb332
* Various dropdown code quality fixes * Prepare support for privacy selection in boost modal * Add dropdown for boost privacy in boost confirmation modal
23 lines
701 B
JavaScript
23 lines
701 B
JavaScript
import { connect } from 'react-redux';
|
|
import PrivacyDropdown from '../components/privacy_dropdown';
|
|
import { changeComposeVisibility } from '../../../actions/compose';
|
|
import { openModal, closeModal } from '../../../actions/modal';
|
|
import { isUserTouching } from '../../../is_mobile';
|
|
|
|
const mapStateToProps = state => ({
|
|
value: state.getIn(['compose', 'privacy']),
|
|
});
|
|
|
|
const mapDispatchToProps = dispatch => ({
|
|
|
|
onChange (value) {
|
|
dispatch(changeComposeVisibility(value));
|
|
},
|
|
|
|
isUserTouching,
|
|
onModalOpen: props => dispatch(openModal('ACTIONS', props)),
|
|
onModalClose: () => dispatch(closeModal()),
|
|
|
|
});
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(PrivacyDropdown);
|