Merge pull request #102 from ClaytonWWilson/otheruser_posts

display posts on other user's page
This commit is contained in:
Leon Liang
2019-12-03 18:14:40 -05:00
committed by GitHub
5 changed files with 454 additions and 288 deletions

View File

@@ -147,7 +147,7 @@ class user extends Component {
// console.log(res.data);
this.setState({
posts: res.data
})
});
})
.catch(err => console.log(err));
}
@@ -222,19 +222,22 @@ class user extends Component {
{post.createdAt}
</Typography>
<br />
<Typography variant="body1">
<b>{post.microBlogTitle}</b>
</Typography>
<Typography variant="body2">{post.quoteBody}</Typography>
<br />
<Typography variant="body2">{post.body}</Typography>
<br />
<Typography variant="body2"><b>Topics:</b> {post.microBlogTopics}</Typography>
<Typography variant="body2">
<b>Topics:</b> {post.microBlogTopics}
</Typography>
<br />
<Typography variant="body2" color={"textSecondary"}>Likes {post.likeCount}</Typography>
<Typography variant="body2" color={"textSecondary"}>
Likes {post.likeCount}
</Typography>
</CardContent>
</Card>
))