-
Notifications
You must be signed in to change notification settings - Fork 141
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
technigo-w7-project-happy-thoughts #75
Conversation
src/components/Container.jsx
Outdated
const [loading, setLoading] = useState(true); | ||
const [totalNumberOfLikes, setTotalNumberOfLikes] = useState(() => { | ||
const storedLikes = localStorage.getItem("numberOfLikes"); | ||
return storedLikes ? JSON.parse(storedLikes) : ""; |
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.
maybe this needs to be a number 0 instead of a string? each time I press it the 1 goes on the end so it says "You have liked 1 happy thoughts", "You have liked 11 happy thoughts", "You have liked 111 happy thoughts.° instead of saying 1, 2, 3 and so on
{loading ? ( | ||
<> | ||
<i className="fa-solid fa-heart fa-beat fa-5x"></i> | ||
<p>Loading</p> |
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 touch with the heart when loading!
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.
Hey Maja amazing work on this project!!
Managing perfect the useEffect hook with the level of prop destructuring!! Honestly it's looking flawlessly!!!
Keep up the great work
Netlify link
https://technigo-w7-project-happy-thoughts.netlify.app/