summaryrefslogtreecommitdiffstats
path: root/web/react/components/post_body.jsx
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2015-08-12 12:45:15 -0400
committerJoramWilander <jwawilander@gmail.com>2015-08-18 08:59:26 -0400
commitfa1491bbfbb1261757943759edf44883d31e5477 (patch)
treeac5474908c28abf741371602603e22669cb4197e /web/react/components/post_body.jsx
parentc77f6041889b2dd8c6e830b8c2f42ab9c1340849 (diff)
downloadchat-fa1491bbfbb1261757943759edf44883d31e5477.tar.gz
chat-fa1491bbfbb1261757943759edf44883d31e5477.tar.bz2
chat-fa1491bbfbb1261757943759edf44883d31e5477.zip
finalize implenetation of predictive client posts so that users get immediate feedback after posting
Diffstat (limited to 'web/react/components/post_body.jsx')
-rw-r--r--web/react/components/post_body.jsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/web/react/components/post_body.jsx b/web/react/components/post_body.jsx
index 65e045344..77a8fd7b5 100644
--- a/web/react/components/post_body.jsx
+++ b/web/react/components/post_body.jsx
@@ -4,6 +4,7 @@
var FileAttachmentList = require('./file_attachment_list.jsx');
var UserStore = require('../stores/user_store.jsx');
var utils = require('../utils/utils.jsx');
+var Constants = require('../utils/constants.jsx');
module.exports = React.createClass({
componentWillReceiveProps: function(nextProps) {
@@ -60,10 +61,10 @@ module.exports = React.createClass({
}
var loading;
- if (post.did_fail) {
+ if (post.state === Constants.POST_FAILED) {
postClass += " post-fail";
loading = <a className="post-retry pull-right" href="#" onClick={this.props.retryPost}>Retry</a>;
- } else if (post.is_loading) {
+ } else if (post.state === Constants.POST_LOADING) {
postClass += " post-waiting";
loading = <img className="post-loading-gif pull-right" src="/static/images/load.gif"/>;
}