Conversation
DALA746
left a comment
There was a problem hiding this comment.
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! :)
| 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> | ||
| `; | ||
| }; |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
It's great that you use console logs! They're really helpful! Don't forget to delete them after you finished with the project :)
| fetchPullRequestArray(technigoRepositories); | ||
| drawProgressChart(technigoRepositories); |
https://practical-fermi-1dc0a6.netlify.app/