-
Notifications
You must be signed in to change notification settings - Fork 12
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
Week2 #9
base: master
Are you sure you want to change the base?
Week2 #9
Conversation
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.
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) => { |
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.
Looks good!
fetchJSON(url, (err, data) => { | ||
const root = document.getElementById('root'); | ||
if (err) { | ||
function renderContributors(contributors, contributorsContainer) { |
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.
Nice naming of the function and arguments!
@@ -18,7 +18,9 @@ | |||
</head> | |||
|
|||
<body> | |||
<div id="root"></div> | |||
<header> |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this works, did you try it?
} | ||
header { | ||
width: 800px; |
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.
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.