Add related videos to listing template

This commit is contained in:
Sam Carlton 2022-04-27 14:29:43 -05:00
parent 6acaee1b5a
commit b3a4bffdf8
2 changed files with 27 additions and 3 deletions

View file

@ -7,6 +7,7 @@ import {
import Aliases from '~/src/components/listing-parts/aliases.astro' import Aliases from '~/src/components/listing-parts/aliases.astro'
import RelatedLinks from '~/src/components/listing-parts/related-links.astro' import RelatedLinks from '~/src/components/listing-parts/related-links.astro'
import RelatedVideos from '~/src/components/listing-parts/related-videos.astro'
import AllUpdatesSubscribe from '~/components/all-updates-subscribe.vue' import AllUpdatesSubscribe from '~/components/all-updates-subscribe.vue'
@ -47,9 +48,9 @@ const details = new ListingDetails( listing )
/> />
</div> </div>
<div class="links space-y-6 sm:space-x-6"> <RelatedVideos
<!-- { relatedLinksHtml } --> listing={ listing }
</div> />
</div> </div>

View file

@ -0,0 +1,23 @@
---
import Heading from './heading.astro'
import VideoRow from '~/src/components/video/row.astro'
const {
listing
} = Astro.props
const hasRelatedVideos = listing.relatedVideos.length > 0
---
<div
class="related-videos w-full"
>
<Heading text="Related Videos" />
<VideoRow
videos={listing.relatedVideos}
/>
<VideoRow
videos={listing.relatedVideos}
/>
</div>