2017-02-26 00:23:44 +00:00
|
|
|
import { connect } from 'react-redux';
|
2017-03-24 23:01:43 +00:00
|
|
|
import PrivacyDropdown from '../components/privacy_dropdown';
|
2017-02-26 00:23:44 +00:00
|
|
|
import { changeComposeVisibility } from '../../../actions/compose';
|
|
|
|
|
|
|
|
const mapStateToProps = state => ({
|
2017-03-24 23:01:43 +00:00
|
|
|
value: state.getIn(['compose', 'privacy'])
|
2017-02-26 00:23:44 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
const mapDispatchToProps = dispatch => ({
|
|
|
|
|
2017-03-24 23:01:43 +00:00
|
|
|
onChange (value) {
|
|
|
|
dispatch(changeComposeVisibility(value));
|
2017-02-26 00:23:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
2017-03-24 23:01:43 +00:00
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(PrivacyDropdown);
|