1
0
Fork 0

fix up comments logic for displaying

This commit is contained in:
Amarpreet Minhas 2020-01-29 20:56:22 -05:00
parent 25e536bf7e
commit 221787eba4

View file

@ -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}>