Uh oh!
There was an error while loading. Please reload this page.
Week2 - #9
Conversation
mattiaslundberg
left a comment
There was a problem hiding this comment.
Promises part looks good! Missing some thing regarding css (especially on mobile), that's a requirement to pass week 2 so please have a look at it!
Let me know if you need any assistance!
| xhr.onerror = () => cb(new Error('Network request failed')); | ||
| xhr.send(); | ||
| function fetchJSON(url) { | ||
| return new Promise((resolve, reject) => { |
| fetchJSON(url, (err, data) => { | ||
| const root = document.getElementById('root'); | ||
| if (err) { | ||
| function renderContributors(contributors, contributorsContainer) { |
There was a problem hiding this comment.
Nice naming of the function and arguments!
| <body> | ||
| <div id="root"></div> | ||
| <header> |
There was a problem hiding this comment.
Why wrapping the entire app in <header>, it seems only parts of the app should be in header?
| align-items: flex-start; | ||
| justify-content: center; | ||
| } | ||
| @media screen and (max-width: 768px) { |
There was a problem hiding this comment.
I don't think this works, did you try it?
| margin: 10px; | ||
| } | ||
| header { | ||
| width: 800px; |
There was a problem hiding this comment.
It's usually not a good idea to hard-code a specific width, try to display as a fraction of the avaliable space instead. It breaks on mobile :/
No description provided.