Local-only option and dropdown all working

This commit is contained in:
Surinna Curtis
2017-07-01 16:39:19 -05:00
committed by Gô Shoemake
parent b73ee36949
commit 556cede00f
6 changed files with 76 additions and 10 deletions

View File

@@ -1,3 +1,17 @@
import { connect } from 'react-redux';
import AdvancedOptionsDropdown from '../components/advanced_options_dropdown';
import { changeComposeAdvancedOption } from '../../../actions/compose';
export default AdvancedOptionsDropdown;
const mapStateToProps = state => ({
values: state.getIn(['compose', 'advanced_options']),
});
const mapDispatchToProps = dispatch => ({
onChange (option) {
dispatch(changeComposeAdvancedOption(option));
},
});
export default connect(mapStateToProps, mapDispatchToProps)(AdvancedOptionsDropdown);

View File

@@ -15,6 +15,7 @@ const mapStateToProps = state => ({
text: state.getIn(['compose', 'text']),
suggestion_token: state.getIn(['compose', 'suggestion_token']),
suggestions: state.getIn(['compose', 'suggestions']),
advanced_options: state.getIn(['compose', 'advanced_options']),
spoiler: state.getIn(['compose', 'spoiler']),
spoiler_text: state.getIn(['compose', 'spoiler_text']),
privacy: state.getIn(['compose', 'privacy']),