1
0
Fork 0

Some cleanup around comments

This commit is contained in:
Amarpreet Minhas 2020-02-01 18:01:48 -05:00
parent e1dee7fe14
commit 892d6288e3

View file

@ -25,11 +25,13 @@ class Post extends React.Component {
return comments.map(comment => { return comments.map(comment => {
return ( return (
<div className="item" key={comment.id}> <div className="item" key={comment.id}>
<h4><b>Comment by <Link to={"/users/"+ comment.author}>{comment.author}</Link></b></h4>
<div className="content"> <div className="content">
<div className="markdown-body"> <div className="markdown-body">
<ReactMarkdown source={comment.content} /> <ReactMarkdown source={comment.content} />
</div> </div>
</div> </div>
<hr style={{height:2}}></hr>
</div> </div>
); );
}); });
@ -44,7 +46,7 @@ class Post extends React.Component {
<div className="item" key={post.id}> <div className="item" key={post.id}>
<div className="content"> <div className="content">
<div className="description"> <div className="description">
<h1><b><u><Link to={"/posts/" + post.slug}>{post.title}</Link></u></b></h1> <h4><b><u><Link to={"/posts/" + post.slug}>{post.title}</Link></u></b></h4>
<h3><b>By <Link to={"/users/"+ post.author}>{post.author}</Link></b></h3> <h3><b>By <Link to={"/users/"+ post.author}>{post.author}</Link></b></h3>
<h4>Posted {post.time_published}</h4> <h4>Posted {post.time_published}</h4>
<div className="markdown-body"> <div className="markdown-body">
@ -54,6 +56,8 @@ class Post extends React.Component {
</div> </div>
<Comment></Comment> <Comment></Comment>
</div> </div>
<h3>Comments:</h3>
<hr></hr>
{ this.renderComments(post.comments,post.id) } { this.renderComments(post.comments,post.id) }
</div> </div>
) )