diff options
Diffstat (limited to 'webapp/components/post_view/post_message_view/index.js')
-rw-r--r-- | webapp/components/post_view/post_message_view/index.js | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/webapp/components/post_view/post_message_view/index.js b/webapp/components/post_view/post_message_view/index.js deleted file mode 100644 index 84682eb89..000000000 --- a/webapp/components/post_view/post_message_view/index.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2017 Mattermost, Inc. All Rights Reserved. -// See License.txt for license information. - -import {connect} from 'react-redux'; -import {getCustomEmojisByName} from 'mattermost-redux/selectors/entities/emojis'; -import {getBool} from 'mattermost-redux/selectors/entities/preferences'; -import {getCurrentUserMentionKeys, getUsersByUsername} from 'mattermost-redux/selectors/entities/users'; - -import {getCurrentTeam} from 'mattermost-redux/selectors/entities/teams'; - -import {Preferences} from 'mattermost-redux/constants'; -import {getSiteURL} from 'utils/url.jsx'; - -import {EmojiMap} from 'stores/emoji_store.jsx'; - -import PostMessageView from './post_message_view.jsx'; - -function makeMapStateToProps() { - let emojiMap; - let oldCustomEmoji; - - return function mapStateToProps(state, ownProps) { - const newCustomEmoji = getCustomEmojisByName(state); - if (newCustomEmoji !== oldCustomEmoji) { - emojiMap = new EmojiMap(newCustomEmoji); - } - oldCustomEmoji = newCustomEmoji; - - return { - ...ownProps, - emojis: emojiMap, - enableFormatting: getBool(state, Preferences.CATEGORY_ADVANCED_SETTINGS, 'formatting', true), - mentionKeys: getCurrentUserMentionKeys(state), - usernameMap: getUsersByUsername(state), - team: getCurrentTeam(state), - siteUrl: getSiteURL() - }; - }; -} - -export default connect(makeMapStateToProps)(PostMessageView); |