-
Notifications
You must be signed in to change notification settings - Fork 434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Happy Thoughts! #443
base: master
Are you sure you want to change the base?
Happy Thoughts! #443
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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>} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great feature!
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very well done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this disabled because useEffect was never used in this component?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hihi :-D
https://amandas-happy-thoughts.netlify.app/