Created
October 14, 2020 14:29
-
-
Save codebubb/07cfbd3321c5221b6918b4969604e6d7 to your computer and use it in GitHub Desktop.
React YouTube Viewer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| export const Video = props => ( | |
| <div className="videos__item"> | |
| <div className="video__image"> | |
| <a target="_blank" href={props.video.link}> | |
| <img src={`https://i4.ytimg.com/vi/${props.video.guid.split(':')[2]}/mqdefault.jpg`} /> | |
| </a> | |
| </div> | |
| <div className="video__footer"> | |
| <p>{props.video.title}</p> | |
| </div> | |
| </div> | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment