Skip to content
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

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open

Happy Thoughts! #443

wants to merge 20 commits into from

Conversation

Amanda-Sjstrm
Copy link

Copy link

@SandraMadeleine SandraMadeleine left a 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"],

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

Copy link
Author

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>}

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

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!

Copy link
Author

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 */

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?

Copy link
Author

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'))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hihi :-D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants