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