mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Enable related videos fo tv pages
This commit is contained in:
parent
5a0e3e58f9
commit
bc5efc5b8c
1 changed files with 4 additions and 3 deletions
|
|
@ -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>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue