Update videos.js

This commit is contained in:
Kevin Kandlbinder 2021-06-16 21:28:52 +02:00 committed by GitHub
parent 05fdbbdcfa
commit 34d2aa5326
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,7 +21,7 @@ const VideoPage = ({ data }) => (
<h1>Videos</h1>
<div className={styles.videoGrid}>
{data.allYoutubeVideo.nodes.map((node, index) => (
<a href={"https://youtu.be/"+node.videoId} style={makeStyle(node.localThumbnail.publicURL)} target={"_blank"} rel={"noreferrer"}>
<a href={"https://youtu.be/"+node.videoId} style={makeStyle(node.localThumbnail ? node.localThumbnail.publicURL : "https://source.unsplash.com/Vy2cHqm0mCs/1920x1080")} target={"_blank"} rel={"noreferrer"}>
<span className={styles.title}>{node.title.replace(/ *\[[^)]*\] */g, "").replace(/\| Unkn0wnCat/g, "")}</span>
<span className={styles.timeAgo}>{node.publishedAt}</span>
</a>