2017-07-12 10:02:51 +02:00
|
|
|
// Package imports //
|
|
|
|
import { connect } from 'react-redux';
|
|
|
|
|
|
|
|
// Mastodon imports //
|
2017-07-12 07:50:50 +02:00
|
|
|
import { toggleComposeAdvancedOption } from '../../../mastodon/actions/compose';
|
2017-07-12 10:02:51 +02:00
|
|
|
|
|
|
|
// Our imports //
|
|
|
|
import ComposeAdvancedOptions from '../../components/compose/advanced_options';
|
|
|
|
|
|
|
|
const mapStateToProps = state => ({
|
|
|
|
values: state.getIn(['compose', 'advanced_options']),
|
|
|
|
});
|
|
|
|
|
|
|
|
const mapDispatchToProps = dispatch => ({
|
|
|
|
|
|
|
|
onChange (option) {
|
2017-07-12 07:50:50 +02:00
|
|
|
dispatch(toggleComposeAdvancedOption(option));
|
2017-07-12 10:02:51 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(ComposeAdvancedOptions);
|