From ade5802ed1ecabdc388c9838d23eec2a9c46e096 Mon Sep 17 00:00:00 2001
From: Asaad Mahmood <asaad@spinpunch.com>
Date: Thu, 19 Nov 2015 01:11:06 +0500
Subject: Posts structure improvement

---
 web/react/components/post.jsx | 59 +++++++++++++++++++------------------------
 1 file changed, 26 insertions(+), 33 deletions(-)

(limited to 'web/react/components/post.jsx')

diff --git a/web/react/components/post.jsx b/web/react/components/post.jsx
index 2b9586345..474478de2 100644
--- a/web/react/components/post.jsx
+++ b/web/react/components/post.jsx
@@ -141,6 +141,8 @@ export default class Post extends React.Component {
         var postType = '';
         if (type !== 'Post') {
             postType = 'post--comment';
+        } else if (commentCount > 0) {
+            postType = 'post--root';
         }
 
         var currentUserCss = '';
@@ -170,14 +172,11 @@ export default class Post extends React.Component {
             }
 
             profilePic = (
-                <div className='post-profile-img__container'>
-                    <img
-                        className='post-profile-img'
-                        src={src}
-                        height='36'
-                        width='36'
-                    />
-                </div>
+                <img
+                    src={src}
+                    height='36'
+                    width='36'
+                />
             );
         }
 
@@ -187,32 +186,26 @@ export default class Post extends React.Component {
                     id={'post_' + post.id}
                     className={'post ' + sameUserClass + ' ' + rootUser + ' ' + postType + ' ' + currentUserCss}
                 >
-                    {profilePic}
                     <div className='post__content'>
-                        <PostHeader
-                            ref='header'
-                            post={post}
-                            sameRoot={this.props.sameRoot}
-                            commentCount={commentCount}
-                            handleCommentClick={this.handleCommentClick}
-                            isLastComment={this.props.isLastComment}
-                        />
-                        <PostBody
-                            post={post}
-                            sameRoot={this.props.sameRoot}
-                            parentPost={parentPost}
-                            posts={posts}
-                            handleCommentClick={this.handleCommentClick}
-                            retryPost={this.retryPost}
-                        />
-                        <PostInfo
-                            ref='info'
-                            post={post}
-                            sameRoot={this.props.sameRoot}
-                            commentCount={commentCount}
-                            handleCommentClick={this.handleCommentClick}
-                            allowReply='true'
-                        />
+                        <div className='post__img'>{profilePic}</div>
+                        <div>
+                            <PostHeader
+                                ref='header'
+                                post={post}
+                                sameRoot={this.props.sameRoot}
+                                commentCount={commentCount}
+                                handleCommentClick={this.handleCommentClick}
+                                isLastComment={this.props.isLastComment}
+                            />
+                            <PostBody
+                                post={post}
+                                sameRoot={this.props.sameRoot}
+                                parentPost={parentPost}
+                                posts={posts}
+                                handleCommentClick={this.handleCommentClick}
+                                retryPost={this.retryPost}
+                            />
+                        </div>
                     </div>
                 </div>
             </div>
-- 
cgit v1.2.3-1-g7c22


From 3e2aba873db6cee3838930321416275b2bbce2be Mon Sep 17 00:00:00 2001
From: Asaad Mahmood <asaad@spinpunch.com>
Date: Thu, 19 Nov 2015 01:20:49 +0500
Subject: Removing postInfo from post.jsx

---
 web/react/components/post.jsx | 2 --
 1 file changed, 2 deletions(-)

(limited to 'web/react/components/post.jsx')

diff --git a/web/react/components/post.jsx b/web/react/components/post.jsx
index 474478de2..7e4af07c4 100644
--- a/web/react/components/post.jsx
+++ b/web/react/components/post.jsx
@@ -13,8 +13,6 @@ var AsyncClient = require('../utils/async_client.jsx');
 var ActionTypes = Constants.ActionTypes;
 var utils = require('../utils/utils.jsx');
 
-var PostInfo = require('./post_info.jsx');
-
 export default class Post extends React.Component {
     constructor(props) {
         super(props);
-- 
cgit v1.2.3-1-g7c22

