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 (
<div className="item" key={comment.id}>
<div className="content">
<div className="markdown-body">
<ReactMarkdown source={comment.content} />
<h4><b>Comment by <Link to={"/users/"+ comment.author}>{comment.author}</Link></b></h4>
<div className="content">
<div className="markdown-body">
<ReactMarkdown source={comment.content} />
</div>
</div>
</div>
<hr style={{height:2}}></hr>
</div>
);
});
@ -44,7 +46,7 @@ class Post extends React.Component {
<div className="item" key={post.id}>
<div className="content">
<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>
<h4>Posted {post.time_published}</h4>
<div className="markdown-body">
@ -54,6 +56,8 @@ class Post extends React.Component {
</div>
<Comment></Comment>
</div>
<h3>Comments:</h3>
<hr></hr>
{ this.renderComments(post.comments,post.id) }
</div>
)