-
Notifications
You must be signed in to change notification settings - Fork 52
Challenge 3 #48
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
base: master
Are you sure you want to change the base?
Challenge 3 #48
Conversation
erickwize
left a comment
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.
Comments:
Good job Javier! I see it is working but sometimes crashes when the snippet is undefined. I also see you use npm and yarn to install dependencies (not a good practice). I gave some recommendations but the code looks good.
Acceptance Criteria
- Videos in the Home View are fetched from the YouTube API and displayed correctly.
- Users can search for YouTube videos using the search field on the header.
- A video can be played from the Video Details View after clicking on it.
- The video information and related videos list are displayed correctly on the Video Details View.
- When a user clicks on a related video the video player, information and related videos list are updated.
Bonus Points
- Custom Hooks for API calls are implemented and tested correctly.
- Testing coverage is above 60%. (Please include a screenshot of the code coverage report in your PR description).
| @@ -0,0 +1,12 @@ | |||
| import axios from 'axios'; | |||
|
|
|||
| const KEY = 'AIzaSyAKlMA9FgSpXSkjxhs69n6zsBOPhcHtiKA'; | |||
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 highly recommend hiding this key on .env file
| const renderedVideos = videos.map((video) => { | ||
| return ( | ||
| <VideoCard | ||
| key={Math.random()} | ||
| video={video} | ||
| handleVideoSelected={handleVideoSelected} | ||
| /> | ||
| ); | ||
| }); | ||
| return <VideoListContainer>{renderedVideos}</VideoListContainer>; |
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 is common to see the map usage inside the component without creating a variable with it.
i.e.
return (
<VideoListContainer>
{videos.map(...
)}
</VideoListContainer>| const HomeBody = styled.div` | ||
| background-color: #1a243b; | ||
| text-align: center; | ||
| display: flex; | ||
| `; | ||
| const VideoRelatedWrap = styled.div` | ||
| text-align: center; | ||
| flex: 3; | ||
| margin-top: 100px; | ||
| `; | ||
| const H4 = styled.h4` | ||
| color: #b9b1b1; | ||
| `; | ||
| const VideoListWrap = styled.div` | ||
| text-align: center; | ||
| flex: 4; | ||
| `; | ||
| const VideoDetailWrap = styled.div` | ||
| text-align: center; | ||
| flex: 5; | ||
| `; |
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 recommend extracting all the CSS logic to a different file so we have consistency and separation of responsabilites.
No description provided.