2017-07-12 17:02:51 +09:00
|
|
|
// Package imports //
|
|
|
|
import { connect } from 'react-redux';
|
|
|
|
|
|
|
|
// Mastodon imports //
|
2017-07-13 18:40:16 +09:00
|
|
|
import { toggleComposeAdvancedOption } from '../../../../mastodon/actions/compose';
|
2017-07-12 17:02:51 +09:00
|
|
|
|
|
|
|
// Our imports //
|
2017-07-13 18:40:16 +09:00
|
|
|
import ComposeAdvancedOptions from '.';
|
2017-07-12 17:02:51 +09:00
|
|
|
|
|
|
|
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);
|