Skip to content

Aschwin Siaila#37

Open
AschwinSiaila wants to merge 5 commits intoTechnigo:mainfrom
AschwinSiaila:main
Open

Aschwin Siaila#37
AschwinSiaila wants to merge 5 commits intoTechnigo:mainfrom
AschwinSiaila:main

Conversation

@AschwinSiaila
Copy link
Copy Markdown

Copy link
Copy Markdown

@DALA746 DALA746 left a comment

Choose a reason for hiding this comment

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

Really clean and "friendly-to-read" code you have 💯 Your website follows all of the Blue requirements, I only want to add one thing about the doughnut chart size on your page. It's too big, I had the same problem. To solve this I put canvas tag in a div and gave it a class name and then I could change the size. I think even Jennie talked about another solution on Friday Q&A. Otherwise great job! :)

Comment on lines +6 to +23
const NameandPicture = () => {
const personal_ID = `https://api.github.com/users/${USER}`;
fetch(personal_ID)
.then((res) => res.json())
.then((data) => {
global__UserData = data;
})
.then(() => NameAndPicture());
};

const NameAndPicture = () => {
const picture = global__UserData.avatar_url;

nameAndPicture.innerHTML += `
<img class="profile-pic" src="${picture}" alt="Picture of gitHub-user"/>
<div class="profile-name">${USER}</div>
`;
};
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

These functions have the same name. In the first one you fetching the data and another one you creating HTML. If you combine those two you can have only one function and have mu less lines of code but the same functionality :) just copy everything that you have in your second function and put it in your first one after line 13

.then((data) => {
const technigoRepositories = data.filter((repo) => repo.name.includes("project-") && repo.fork);

console.log(technigoRepositories);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It's great that you use console logs! They're really helpful! Don't forget to delete them after you finished with the project :)

Comment on lines +44 to +45
fetchPullRequestArray(technigoRepositories);
drawProgressChart(technigoRepositories);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Great names for the functions! 💯

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