Conversation
SandraMadeleine
left a comment
There was a problem hiding this comment.
Sorry that I can't leave so much constructive feedback as I barely started this project myself. But your code is very very clean and easy to read, and well structured. The output is also very nice to look at, good job Amanda!
| "extends": [ | ||
| "airbnb" | ||
| ], | ||
| "extends": ["airbnb"], |
There was a problem hiding this comment.
Was this just "tidying up" or does it help with the code? Honest question, anything that helps is good to know! :-D
There was a problem hiding this comment.
I dont even remember doing this 😅 I think it might be the result of some eslint/prettier config?🤔
| </label> | ||
| <div className="thought-length"> | ||
| <span>{newThought.length}/140 </span> | ||
| {newThought.length > 140 && <span>Your thought is too long!</span>} |
| const creationDateObject = new Date(creationDate); | ||
| const formattedCreationDate = formatDistanceToNow(creationDateObject, { addSuffix: true }); | ||
|
|
||
| // Two different heart backgrounds depending on if there are likes or not |
There was a problem hiding this comment.
Thank you! I stole it from someone else 😅
| @@ -0,0 +1,85 @@ | |||
| /* eslint-disable no-underscore-dangle */ | |||
| /* eslint-disable no-unused-vars */ | |||
There was a problem hiding this comment.
Is this disabled because useEffect was never used in this component?
There was a problem hiding this comment.
No i think it's const postNewThought that i never used, but it's weird because i thought this function was needed to "clean up" the form after submit, but somehow it still works 🤔
| }; | ||
| fetch(`https://happy-thoughts-ux7hkzgmwa-uc.a.run.app/thoughts/${id}/like`, options) | ||
| .then((res) => res.json()) | ||
| .then(console.log('bajskorv')) |
https://amandas-happy-thoughts.netlify.app/