-
Notifications
You must be signed in to change notification settings - Fork 145
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
Gaby's Happy Thoughts Project w11 #109
base: main
Are you sure you want to change the base?
Conversation
…rns the messages as listed
…es a POST-request. Successful
…n together with all the other thoughts/posts
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.
Overall a solid project Gaby, but I have one change request for you: update the feed with the newly posted thought.
Apart from that, good job! 🔥
@@ -1,3 +1,16 @@ | |||
import React from "react" |
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 need to import React
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 not a 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.
Nice and clean! ✨
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 error handling, and really good that you remembered the label! However, something more needs to happen when you post a thought:
- either do an optimistic UI update as described in the instructions
- or trigger the fetch of thoughts
so that the feed updates with the new thought
<span aria-label="Number of likes"> x {thought.hearts}</span> {/* Display likes outside the button */} | ||
</div> | ||
<div className="time-container"> | ||
<p>{formatDistance(new Date(thought.createdAt), Date.now(), { addSuffix: true })}</p> {/*npm install date-fns --save to */} |
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.
⭐
https://gabyshappythoughts.netlify.app/