-
Notifications
You must be signed in to change notification settings - Fork 131
Week 7 - GitHub Tracker - Fay Pistikozoglou #101
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
base: main
Are you sure you want to change the base?
Conversation
jiiinCho
left a comment
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.
Your website works without any errors, links direct to correct page also it’s designed for mobile responsive :) Your script is clean enough to follow the function flow. Great work! Just one comment might be to add a margin in your
element, giving some space in desktop display. Good job again!| fetch(API_URL, options) // options object is passed as 2nd argument to fetch() function. | ||
| .then(res => res.json()) | ||
| .then(data => { | ||
| const myRepos = data.filter((forkedRepos) => forkedRepos.fork == true && forkedRepos.name.startsWith("project-")) |
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.
great inline expression 👍
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.
Thank youuu!
| const commitUrl = mostRecentCommit.html_url | ||
| const commitDateString = mostRecentCommit.commit.author.date | ||
| const commitDate = Date.parse(commitDateString) | ||
| const commitTimeSince = timeSince(commitDate) |
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.
great to use function definition for displaying date 👍
|
|
||
| } | ||
|
|
||
| const handlePullRequest = (repoElementId, myPullRequests) => { |
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 readability to define handlePullRequest separately!
code/script.js
Outdated
| }) | ||
|
|
||
| myPullRequests | ||
| .map(pullRequest => pullRequest.review_comments_url) |
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 just wonder if you need both map and forEach?
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 separated the 2 just to have a bit cleaner code. It is totally optional :) Thanks for checking though!
https://fay-github-tracker.netlify.app/