diff --git a/functions/handlers/post.js b/functions/handlers/post.js
index 788c64e..da8474f 100644
--- a/functions/handlers/post.js
+++ b/functions/handlers/post.js
@@ -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)
diff --git a/twistter-frontend/src/pages/user.js b/twistter-frontend/src/pages/user.js
index 59c096e..b83f55a 100644
--- a/twistter-frontend/src/pages/user.js
+++ b/twistter-frontend/src/pages/user.js
@@ -230,7 +230,7 @@ class user extends Component {
{post.userHandle}
- {post.createdAt}
+ {this.formatDate(post.createdAt) }
@@ -243,7 +243,7 @@ class user extends Component {
{post.body}
- Topics: {post.microBlogTopics}
+ Topics: {post.microBlogTopics.join(", ")}