fix up comments logic for displaying
This commit is contained in:
parent
25e536bf7e
commit
221787eba4
1 changed files with 14 additions and 15 deletions
|
@ -18,26 +18,25 @@ class Post extends React.Component {
|
||||||
.then(() => this.setState({isLoading: false}))
|
.then(() => this.setState({isLoading: false}))
|
||||||
}
|
}
|
||||||
|
|
||||||
renderComments() {
|
renderComments(comments) {
|
||||||
//if (comments.length) {
|
if (comments) {
|
||||||
//return comments.map(comment => {
|
return comments.map(comment => {
|
||||||
// return (
|
return (
|
||||||
// <div className="item" key={comment.id}>
|
<div className="item" key={comment.id}>
|
||||||
// <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>
|
||||||
// </div>
|
</div>
|
||||||
// );
|
);
|
||||||
//});
|
});
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
renderPost() {
|
renderPost() {
|
||||||
const {posts} = this.props
|
const {posts} = this.props
|
||||||
const post = posts.entities[posts.currentId]
|
const post = posts.entities[posts.currentId]
|
||||||
console.log(post)
|
|
||||||
return(
|
return(
|
||||||
<div className="container">
|
<div className="container">
|
||||||
<div className="item" key={post.id}>
|
<div className="item" key={post.id}>
|
||||||
|
|
Reference in a new issue