This repository has been archived on 2019-05-14. You can view files and clone it, but cannot push or open issues or pull requests.
mastodon/app/assets/javascripts/components/containers/composer_drawer_container.jsx
2016-08-31 16:15:12 +02:00

25 lines
668 B
JavaScript

import { connect } from 'react-redux';
import ComposerDrawer from '../components/composer_drawer';
import { changeCompose, submitCompose } from '../actions/compose';
const mapStateToProps = function (state, props) {
return {
text: state.getIn(['compose', 'text']),
isSubmitting: state.getIn(['compose', 'isSubmitting'])
};
};
const mapDispatchToProps = function (dispatch) {
return {
onChange: function (text) {
dispatch(changeCompose(text));
},
onSubmit: function () {
dispatch(submitCompose());
}
}
};
export default connect(mapStateToProps, mapDispatchToProps)(ComposerDrawer);