mattermost-mobile/app/components/file_attachment_list/index.js
Elias Nahum 0f72bb34c2
MM-15719 Use metadata only to render post additional content (#4386)
* MM-15719 Use metadata only to render post additional content

* Default link to empty instead of undefined

* Feedback review
2020-06-29 11:28:07 -04:00

23 lines
829 B
JavaScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {connect} from 'react-redux';
import {canDownloadFilesOnMobile} from '@mm-redux/selectors/entities/general';
import {makeGetFilesForPost} from '@mm-redux/selectors/entities/files';
import {getTheme} from '@mm-redux/selectors/entities/preferences';
import FileAttachmentList from './file_attachment_list';
function makeMapStateToProps() {
const getFilesForPost = makeGetFilesForPost();
return function mapStateToProps(state, ownProps) {
return {
canDownloadFiles: canDownloadFilesOnMobile(state),
files: getFilesForPost(state, ownProps.postId),
theme: getTheme(state),
};
};
}
export default connect(makeMapStateToProps)(FileAttachmentList);