mirror of
https://github.com/ClaytonWWilson/CS307-Team24.git
synced 2025-12-15 18:08:46 +00:00
can sort posts chronologically in userline and formatted topics listing for each post
This commit is contained in:
parent
fc9994d42e
commit
e3522876d7
@ -46,8 +46,10 @@ exports.getallPostsforUser = (req, res) => {
|
||||
myPosts.forEach(function(doc) {
|
||||
posts.push(doc.data());
|
||||
});
|
||||
posts.sort((a, b) => -a.createdAt.localeCompare(b.createdAt));
|
||||
return res.status(200).json(posts);
|
||||
})
|
||||
|
||||
.then(function() {
|
||||
return res
|
||||
.status(200)
|
||||
|
||||
@ -230,7 +230,7 @@ class user extends Component {
|
||||
<b>{post.userHandle}</b>
|
||||
</Typography>
|
||||
<Typography variant="body2" color={"textSecondary"}>
|
||||
{post.createdAt}
|
||||
{this.formatDate(post.createdAt) }
|
||||
</Typography>
|
||||
|
||||
<br />
|
||||
@ -243,7 +243,7 @@ class user extends Component {
|
||||
<Typography variant="body2">{post.body}</Typography>
|
||||
<br />
|
||||
<Typography variant="body2">
|
||||
<b>Topics:</b> {post.microBlogTopics}
|
||||
<b>Topics:</b> {post.microBlogTopics.join(", ")}
|
||||
</Typography>
|
||||
<br />
|
||||
<Typography variant="body2" color={"textSecondary"}>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user