You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
459 B
18 lines
459 B
7 years ago
|
import { connect } from 'react-redux';
|
||
|
import PrivateToggle from '../components/private_toggle';
|
||
|
import { changeComposeVisibility } from '../../../actions/compose';
|
||
|
|
||
|
const mapStateToProps = state => ({
|
||
|
isPrivate: state.getIn(['compose', 'private'])
|
||
|
});
|
||
|
|
||
|
const mapDispatchToProps = dispatch => ({
|
||
|
|
||
|
onChange (e) {
|
||
|
dispatch(changeComposeVisibility(e.target.checked));
|
||
|
}
|
||
|
|
||
|
});
|
||
|
|
||
|
export default connect(mapStateToProps, mapDispatchToProps)(PrivateToggle);
|