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

Projects happy thoughts - Sherry, Brian & Heléne #93

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Copy link
Contributor

@HIPPIEKICK HIPPIEKICK left a comment

Choose a reason for hiding this comment

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

Good job with your happy thoughts projects! You’ve split your components in a good way and I think a next step would be to break it up even further by for example abstracting the API logic into its own file, as well as the timeAgo function (could be its own JS file).

Speaking of the timeAgo function - nice job coding that from scratch! You’ve already heard about date-fns and moment.js, so maybe next time you want to try that.

You’ve successfully created an app that fetches from an API, but I would like you to have another look at the styling:

  • Make sure it’s responsive and look good on devices from 320px up to 1600px. Right now it looks a bit buggy with the likes amount ending up on different lines (plus I’d add some space between like buttton and like amount)
  • Make sure the like button is round (and the design picture suggests to have the like button pink when there’s one or more likes, and grey when there are zero likes)

Really good to see some error handling, just remember to add it to all your fetches.

Some notes about clean code:

  • Your code gets hard to read when you have this massive indentation. Please change it to be only two spaces (1 tab = 2 space) in all files.
  • No need to import React
  • I’d rather see you use a textarea element instead of input type text, as textarea is used for multiple lines of text input

Changes requested:

  • Do another take on the styling
  • Clean up the code

Apart from that, you've done a good job and I think you three should be proud of yourselves 💌

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