2018-10-07 21:44:58 +00:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import ConversationsList from '../components/conversations_list';
|
|
|
|
import { expandConversations } from '../../../actions/conversations';
|
|
|
|
|
|
|
|
const mapStateToProps = state => ({
|
2018-10-25 23:55:08 +00:00
|
|
|
conversations: state.getIn(['conversations', 'items']),
|
2018-10-07 21:44:58 +00:00
|
|
|
isLoading: state.getIn(['conversations', 'isLoading'], true),
|
|
|
|
hasMore: state.getIn(['conversations', 'hasMore'], false),
|
|
|
|
});
|
|
|
|
|
|
|
|
const mapDispatchToProps = dispatch => ({
|
|
|
|
onLoadMore: maxId => dispatch(expandConversations({ maxId })),
|
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(ConversationsList);
|