2017-07-12 17:02:51 +09:00
|
|
|
// Package imports //
|
|
|
|
import { connect } from 'react-redux';
|
|
|
|
|
|
|
|
// Mastodon imports //
|
2017-07-12 14:50:50 +09:00
|
|
|
import { toggleComposeAdvancedOption } from '../../../mastodon/actions/compose';
|
2017-07-12 17:02:51 +09: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 14:50:50 +09:00
|
|
|
dispatch(toggleComposeAdvancedOption(option));
|
2017-07-12 17:02:51 +09:00
|
|
|
},
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(ComposeAdvancedOptions);
|