chinwagsocial/app/javascript/mastodon/features/compose/containers/privacy_dropdown_container.js

31 lines
795 B
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
import { changeComposeVisibility } from '../../../actions/compose';
import { openModal, closeModal } from '../../../actions/modal';
import { isUserTouching } from '../../../is_mobile';
import PrivacyDropdown from '../components/privacy_dropdown';
const mapStateToProps = state => ({
value: state.getIn(['compose', 'privacy']),
});
const mapDispatchToProps = dispatch => ({
2017-03-25 10:01:43 +11:00
onChange (value) {
dispatch(changeComposeVisibility(value));
},
isUserTouching,
onModalOpen: props => dispatch(openModal({
modalType: 'ACTIONS',
modalProps: props,
})),
onModalClose: () => dispatch(closeModal({
modalType: undefined,
ignoreFocus: false,
})),
});
2017-03-25 10:01:43 +11:00
export default connect(mapStateToProps, mapDispatchToProps)(PrivacyDropdown);