forked from Ivasoft/mattermost-mobile
* MM-13957 Reorganize post actions (#2553) * MM-13957 Reorganize post actions * Update mattermost-redux * Update mattermost-redux * Update package-lock.json to resolve build issues * MM-13958/MM-13959 Make postsInChannel into a sparse array (#2600) * MM-13960 Re-add combined system messages (#2637) * MM-13960 Re-add combined system messages * Pass entire post to PostOptions * Update mattermost-redux * Update mattermost-redux * Address feedback * Update mattermost-redux
23 lines
663 B
JavaScript
23 lines
663 B
JavaScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import {connect} from 'react-redux';
|
|
|
|
import {makeGenerateCombinedPost} from 'mattermost-redux/utils/post_list';
|
|
|
|
import Post from 'app/components/post';
|
|
|
|
export function makeMapStateToProps() {
|
|
const generateCombinedPost = makeGenerateCombinedPost();
|
|
|
|
return (state, ownProps) => {
|
|
return {
|
|
post: generateCombinedPost(state, ownProps.combinedId),
|
|
postId: ownProps.combinedId,
|
|
};
|
|
};
|
|
}
|
|
|
|
// Note that this also passes through Post's mapStateToProps
|
|
export default connect(makeMapStateToProps)(Post);
|