clarify video frontmatter prop name
This commit is contained in:
parent
7121a3d58b
commit
f0f0a52401
2 changed files with 4 additions and 4 deletions
|
@ -27,7 +27,7 @@ interface Props {
|
|||
}
|
||||
|
||||
export default function PostLayout({ frontMatter, authorDetails, next, prev, children }: Props) {
|
||||
const { slug, fileName, date, title, tags, video } = frontMatter
|
||||
const { slug, fileName, date, title, tags, youtubeId } = frontMatter
|
||||
|
||||
return (
|
||||
<SectionContainer>
|
||||
|
@ -98,14 +98,14 @@ export default function PostLayout({ frontMatter, authorDetails, next, prev, chi
|
|||
<div className="divide-y divide-gray-200 dark:divide-gray-700 xl:col-span-3 xl:row-span-2 xl:pb-0">
|
||||
<div className="prose max-w-none pt-10 pb-8 dark:prose-dark">
|
||||
{children}
|
||||
{video ? (
|
||||
{youtubeId ? (
|
||||
<div
|
||||
className="relative h-0 w-full max-w-full overflow-hidden"
|
||||
style={{ paddingBottom: '56.25%' }}
|
||||
>
|
||||
<iframe
|
||||
title={title}
|
||||
src={`https://www.youtube.com/embed/${video}`}
|
||||
src={`https://www.youtube.com/embed/${youtubeId}`}
|
||||
className="absolute top-0 left-0 h-full w-full"
|
||||
/>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue