Add youtube links to videos

This commit is contained in:
Kamran Ahmed
2021-09-03 16:54:35 +02:00
parent 96e02195a9
commit 68fc45104d
3 changed files with 59 additions and 40 deletions

View File

@@ -23,10 +23,10 @@ export default function Video(props: VideoProps) {
title={video.title}
subtitle={video.description}
formattedDate={video.formattedUpdatedAt!}
subLink={{
subLink={video.youtubeLink ? {
text: 'Watch on YouTube',
url: 'https://youtube.com'
}}
url: video.youtubeLink
} : undefined}
author={{
twitter: video.author?.twitter!,
name: video.author?.name!,
@@ -74,7 +74,6 @@ type ContextType = {
export async function getStaticProps(context: ContextType) {
const videoId: string = context?.params?.video;
console.log(getVideoById(videoId));
return {
props: {
video: getVideoById(videoId)