summaryrefslogtreecommitdiffstats
path: root/web/react/components/post.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/components/post.jsx')
-rw-r--r--web/react/components/post.jsx12
1 files changed, 9 insertions, 3 deletions
diff --git a/web/react/components/post.jsx b/web/react/components/post.jsx
index afe978495..e877a2213 100644
--- a/web/react/components/post.jsx
+++ b/web/react/components/post.jsx
@@ -6,6 +6,7 @@ var PostBody = require('./post_body.jsx');
var PostInfo = require('./post_info.jsx');
var AppDispatcher = require('../dispatcher/app_dispatcher.jsx');
var Constants = require('../utils/constants.jsx');
+var UserStore = require('../stores/user_store.jsx');
var ActionTypes = Constants.ActionTypes;
module.exports = React.createClass({
@@ -56,7 +57,7 @@ module.exports = React.createClass({
var error = this.state.error ? <div className='form-group has-error'><label className='control-label'>{ this.state.error }</label></div> : null;
- if(this.props.sameRoot){
+ if (this.props.sameRoot){
rootUser = "same--root";
}
else {
@@ -64,13 +65,18 @@ module.exports = React.createClass({
}
var postType = "";
- if(type != "Post"){
+ if (type != "Post"){
postType = "post--comment";
}
+ var currentUser = "";
+ if (UserStore.getCurrentId() === post.user_id) {
+ currentUser = "current--user";
+ }
+
return (
<div>
- <div id={post.id} className={"post " + this.props.sameUser + " " + rootUser + " " + postType}>
+ <div id={post.id} className={"post " + this.props.sameUser + " " + rootUser + " " + postType + " " + currentUser}>
{ !this.props.hideProfilePic ?
<div className="post-profile-img__container">
<img className="post-profile-img" src={"/api/v1/users/" + post.user_id + "/image"} height="36" width="36" />