Skip to content

Instantly share code, notes, and snippets.

@codebubb
Created October 14, 2020 14:29
Show Gist options
  • Select an option

  • Save codebubb/07cfbd3321c5221b6918b4969604e6d7 to your computer and use it in GitHub Desktop.

Select an option

Save codebubb/07cfbd3321c5221b6918b4969604e6d7 to your computer and use it in GitHub Desktop.
React YouTube Viewer
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