25 lines
786 B
JavaScript
25 lines
786 B
JavaScript
import { connect } from 'react-redux';
|
|
import PrivacyDropdown from '../components/privacy_dropdown';
|
|
import { changeComposeVisibility } from 'flavours/glitch/actions/compose';
|
|
import { openModal, closeModal } from 'flavours/glitch/actions/modal';
|
|
import { isUserTouching } from 'flavours/glitch/util/is_mobile';
|
|
|
|
const mapStateToProps = state => ({
|
|
isModalOpen: state.get('modal').modalType === 'ACTIONS',
|
|
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);
|