mattermost-mobile/src/containers/posts_list_container.js
Mike Piccolo 0697bfc066 Mp containers (#26)
* Use containers to map state and dispatch

* Remove unnecessary aslint config

* Remove container from route function

* Change containers to pure containers
2016-10-18 10:51:52 -04:00

23 lines
705 B
JavaScript

// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
import {bindActionCreators} from 'redux';
import {connect} from 'react-redux';
import * as postActions from 'actions/posts';
import PostsListView from 'components/posts_list_view';
function mapStateToProps(state) {
return {
posts: state.entities.posts,
currentTeamId: state.entities.teams.currentTeamId,
currentChannelId: state.entities.channels.currentChannelId
};
}
function mapDispatchToProps(dispatch) {
return {
actions: bindActionCreators(postActions, dispatch)
};
}
export default connect(mapStateToProps, mapDispatchToProps)(PostsListView);