summaryrefslogtreecommitdiffstats
path: root/webapp/components/post.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/post.jsx')
-rw-r--r--webapp/components/post.jsx14
1 files changed, 12 insertions, 2 deletions
diff --git a/webapp/components/post.jsx b/webapp/components/post.jsx
index 7294cf163..7fabec741 100644
--- a/webapp/components/post.jsx
+++ b/webapp/components/post.jsx
@@ -99,6 +99,10 @@ export default class Post extends React.Component {
return true;
}
+ if (nextProps.center !== this.props.center) {
+ return true;
+ }
+
if (!Utils.areObjectsEqual(nextProps.user, this.props.user)) {
return true;
}
@@ -203,13 +207,18 @@ export default class Post extends React.Component {
}
}
+ let centerClass = '';
+ if (this.props.center) {
+ centerClass = 'center';
+ }
+
return (
<div>
<div
id={'post_' + post.id}
className={'post ' + sameUserClass + ' ' + rootUser + ' ' + postType + ' ' + currentUserCss + ' ' + shouldHighlightClass + ' ' + systemMessageClass}
>
- <div className='post__content'>
+ <div className={'post__content ' + centerClass}>
<div className='post__img'>{profilePic}</div>
<div>
<PostHeader
@@ -251,5 +260,6 @@ Post.propTypes = {
shouldHighlight: React.PropTypes.bool,
displayNameType: React.PropTypes.string,
hasProfiles: React.PropTypes.bool,
- currentUser: React.PropTypes.object.isRequired
+ currentUser: React.PropTypes.object.isRequired,
+ center: React.PropTypes.bool
};