Dont render videos row when there are no videos

This commit is contained in:
Sam Carlton 2020-12-11 01:43:48 -06:00
parent 2acfc3e8fb
commit 4d5d39422e

View file

@ -26,7 +26,10 @@
>{{ (i === 0) ? 'View' : link.label }}</LinkButton> >{{ (i === 0) ? 'View' : link.label }}</LinkButton>
</div> </div>
<div class="related-videos w-full"> <div
v-if="relatedVideos.length !== 0"
class="related-videos w-full"
>
<h2 class="subtitle text-xl md:text-2xl font-bold mb-3"> <h2 class="subtitle text-xl md:text-2xl font-bold mb-3">
Related Videos Related Videos
</h2> </h2>
@ -88,7 +91,13 @@ export default {
return { return {
slug, slug,
app, app,
relatedVideos relatedVideos: relatedVideos.map(video => {
// console.log('video', video)
return {
...video,
endpoint: `${slug}/benchmarks#${video.id}`
}
})
} }
}, },
computed: { computed: {