Skip to content

Conversation

@faypi
Copy link

@faypi faypi commented Feb 27, 2022

Copy link

@jiiinCho jiiinCho left a 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-"))

Choose a reason for hiding this comment

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

great inline expression 👍

Copy link
Author

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)

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) => {

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)

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?

Copy link
Author

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!

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