Skip to content

Instantly share code, notes, and snippets.

@productioncoder
Created October 31, 2018 18:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save productioncoder/f36f8688e693a228a3534aec8c22d49e to your computer and use it in GitHub Desktop.
Save productioncoder/f36f8688e693a228a3534aec8c22d49e to your computer and use it in GitHub Desktop.
Youtube VideoPreview with Link
/* ... */
import {Link} from 'react-router-dom';
/*... */
export class VideoPreview extends React.Component {
render() {
/* ... */
return (
<Link to={{pathname: this.props.pathname, search: this.props.search}}>
<div className={['video-preview', horizontal].join(' ')}>
{/* content unchanged */}
</div>
</Link>
);
}
/* ... */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment