summaryrefslogtreecommitdiffstats
path: root/webapp/components/post_view/post_info/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/post_view/post_info/index.js')
-rw-r--r--webapp/components/post_view/post_info/index.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/webapp/components/post_view/post_info/index.js b/webapp/components/post_view/post_info/index.js
new file mode 100644
index 000000000..749ec5aba
--- /dev/null
+++ b/webapp/components/post_view/post_info/index.js
@@ -0,0 +1,31 @@
+// Copyright (c) 2017 Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
+import {connect} from 'react-redux';
+import {bindActionCreators} from 'redux';
+import {removePost, addReaction} from 'mattermost-redux/actions/posts';
+
+import {getBool} from 'mattermost-redux/selectors/entities/preferences';
+
+import {Preferences} from 'utils/constants.jsx';
+
+import PostInfo from './post_info.jsx';
+
+function mapStateToProps(state, ownProps) {
+ return {
+ ...ownProps,
+ useMilitaryTime: getBool(state, Preferences.CATEGORY_DISPLAY_SETTINGS, Preferences.USE_MILITARY_TIME, false),
+ isFlagged: getBool(state, Preferences.CATEGORY_FLAGGED_POST, ownProps.post.id)
+ };
+}
+
+function mapDispatchToProps(dispatch) {
+ return {
+ actions: bindActionCreators({
+ removePost,
+ addReaction
+ }, dispatch)
+ };
+}
+
+export default connect(mapStateToProps, mapDispatchToProps)(PostInfo);