mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-28 08:11:36 +01:00
24 lines
668 B
JavaScript
24 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);
|