As a user, so I can interact with others, I want to be able to comment on posts
Tasks (Front-end)
1) Modify renderPosts function in /posts/utils/getAllPosts.js to also format the createdAt time for each comment, this is to make the time format more readable to the user.
2) Implement a comment entry area to the bottom of a post, this textarea will be controlled using a state(https://reactjs.org/docs/forms.html#controlled-components) and submitting it will send a POST request to the server(https://axios-http.com/docs/post_example). The comment also must not exceed 150 characters:
3) Add a comment component where comments will be rendered in conditionally, the first comment displayed will always be the latest, if there is more than one comment then a button to view all comments will be shown at the bottom of the post, when the user clicks this the post will be expanded displaying all the comments.
4) Then add a filtering function that sorts the comments by ‘Most Recent’ and ‘Oldest’, the UI will be created using MUI(https://mui.com/material-ui/react-menu/)
User Story
As a user, so I can interact with others, I want to be able to comment on posts
Tasks (Front-end)
1) Modify renderPosts function in /posts/utils/getAllPosts.js to also format the createdAt time for each comment, this is to make the time format more readable to the user. 2) Implement a comment entry area to the bottom of a post, this textarea will be controlled using a state(https://reactjs.org/docs/forms.html#controlled-components) and submitting it will send a POST request to the server(https://axios-http.com/docs/post_example). The comment also must not exceed 150 characters:
POST request to ‘/post/:id’ example:
Response example:
3) Add a comment component where comments will be rendered in conditionally, the first comment displayed will always be the latest, if there is more than one comment then a button to view all comments will be shown at the bottom of the post, when the user clicks this the post will be expanded displaying all the comments.
4) Then add a filtering function that sorts the comments by ‘Most Recent’ and ‘Oldest’, the UI will be created using MUI(https://mui.com/material-ui/react-menu/)