andersganander / albumtalk

Front End for pp5 project Album Talk
0 stars 0 forks source link

Fix Comments can't be edited #78

Closed andersganander closed 3 weeks ago

andersganander commented 3 weeks ago

Kind of the same as #77 , but different... When a user choose one of their own comments and selects Edit, the form is shown and it's possible to edit the text, but when the user clicks save nothing happens. In the console the following error message is shown: "TypeError: setComments is not a function at handleSubmit (CommentEditForm.js:24:1)"

I might be wrong, but i'm quite sure this has worked before...

Workaround:

  1. Copy the text from the comment and paste it in the edit form and save to create a new comment.
  2. Then delete the original comment.
andersganander commented 3 weeks ago

Added setReview={setReview} and setComments={setComments}to the Comment component in ReviewPage.js