about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/compose/containers/privacy_dropdown_container.js
blob: 1eee8f84cf87a44e156a519a28f084b809ea6d3e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { connect } from 'react-redux';
import PrivacyDropdown from '../components/privacy_dropdown';
import { changeComposeVisibility } from '../../../actions/compose';

const mapStateToProps = state => ({
  value: state.getIn(['compose', 'privacy'])
});

const mapDispatchToProps = dispatch => ({

  onChange (value) {
    dispatch(changeComposeVisibility(value));
  }

});

export default connect(mapStateToProps, mapDispatchToProps)(PrivacyDropdown);