summaryrefslogtreecommitdiffstats
path: root/web/react/utils
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2015-11-13 12:20:33 -0500
committerhmhealey <harrisonmhealey@gmail.com>2015-11-18 08:50:49 -0500
commita4267471a57c95dd99e17ee5e9fcc95892970764 (patch)
tree0db5c19e03609cbce3f70e20c7fe45a10f640d18 /web/react/utils
parent7b01528d17c61a762ded17a23ccd9a2a728910a0 (diff)
downloadchat-a4267471a57c95dd99e17ee5e9fcc95892970764.tar.gz
chat-a4267471a57c95dd99e17ee5e9fcc95892970764.tar.bz2
chat-a4267471a57c95dd99e17ee5e9fcc95892970764.zip
Converted DeletePostModal to React-Bootstrap
Diffstat (limited to 'web/react/utils')
-rw-r--r--web/react/utils/constants.jsx3
-rw-r--r--web/react/utils/utils.jsx9
2 files changed, 11 insertions, 1 deletions
diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx
index 58ee8e2d2..6be87254f 100644
--- a/web/react/utils/constants.jsx
+++ b/web/react/utils/constants.jsx
@@ -40,7 +40,8 @@ module.exports = {
RECIEVED_ALL_TEAMS: null,
TOGGLE_IMPORT_THEME_MODAL: null,
- TOGGLE_INVITE_MEMBER_MODAL: null
+ TOGGLE_INVITE_MEMBER_MODAL: null,
+ TOGGLE_DELETE_POST_MODAL: null
}),
PayloadSources: keyMirror({
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx
index 77b3ecb57..5af837822 100644
--- a/web/react/utils/utils.jsx
+++ b/web/react/utils/utils.jsx
@@ -1232,3 +1232,12 @@ export function getChannelTerm(channelType) {
return channelTerm;
}
+
+export function getPostTerm(post) {
+ let postTerm = 'Post';
+ if (post.root_id) {
+ postTerm = 'Comment';
+ }
+
+ return postTerm;
+}