Enable related videos fo tv pages

This commit is contained in:
Sam Carlton 2022-06-09 19:10:16 -05:00
parent 5a0e3e58f9
commit bc5efc5b8c

View file

@ -1,4 +1,5 @@
---
import { ensureListingDetails } from '~/helpers/listing-page.js'
import Heading from './heading.astro'
import VideoRow from '~/src/components/video/row.astro'
@ -6,17 +7,17 @@ const {
listing
} = Astro.props
const hasRelatedVideos = Array.isArray( listing.relatedVideos ) && listing.relatedVideos.length > 0
const details = ensureListingDetails(listing)
---
{ hasRelatedVideos && (
{ details.hasRelatedVideos && (
<div
class="related-videos w-full"
>
<Heading text="Related Videos" />
<VideoRow
videos={listing.relatedVideos}
videos={details.relatedVideos}
/>
</div>
)}