diff --git a/functions/handlers/post.js b/functions/handlers/post.js index 35c38df..14c73b9 100644 --- a/functions/handlers/post.js +++ b/functions/handlers/post.js @@ -61,6 +61,7 @@ exports.getAllPosts = (req, res) => { userImage: doc.data().userImage, microBlogTitle: doc.data().microBlogTitle, microBlogTopics: doc.data().microBlogTopics, + id: doc.id, }); }); return res.status(200).json(posts); diff --git a/twistter-frontend/src/pages/user.js b/twistter-frontend/src/pages/user.js index 34627c9..b0b37a8 100644 --- a/twistter-frontend/src/pages/user.js +++ b/twistter-frontend/src/pages/user.js @@ -92,9 +92,10 @@ class user extends Component { label={{topic}.topic.topic} onDelete={handleDelete}/>) ) : (
loading topics...
); - - let recentPostsMarkup = this.state.posts ? ( - this.state.posts.map(post =>Loading...
); return (