-
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
Nora Terbocs - Happy thoughts #440
base: master
Are you sure you want to change the base?
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.
Excellent job on this week's project. :D
What went well:
- The code is well organised and easy to read.
-Stretch goals done well.
-The page is responsive, and functional.
What could be better:
-The if condition for the length of the new thought doesn't work fully - see comment in code.
As always, really nice work Nora. Keep it up! 🎉
message: newThought | ||
}) | ||
} | ||
if (newThought.length > 4) { |
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.
It seems like this if condition is not fully functional, because a new thought is still posted if the length = 4.
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 think that shouldn't be possible because even without adding an if statement the post request blocks it if the text is under 5 characters. The if statement only adds the error msg.
const handleFormSubmit = (event) => { | ||
console.log(newThought) | ||
event.preventDefault() | ||
const options = { |
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.
Good idea storing the method in a variable.
const Loading = () => { | ||
return ( | ||
<section> | ||
<FadeLoader /> |
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.
Nice addition of the loader
noras-happy-thoughts-project.netlify.app