From afec75f482a0a9ef01a54ff0c02391c041b113a0 Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Sat, 26 Dec 2020 19:18:42 -0600 Subject: [PATCH] Use related videos helper on app pages --- pages/app/_slug/index.vue | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pages/app/_slug/index.vue b/pages/app/_slug/index.vue index bcfb3c7..3734fc6 100644 --- a/pages/app/_slug/index.vue +++ b/pages/app/_slug/index.vue @@ -76,17 +76,18 @@ export default { async asyncData ({ params: { slug } }) { const { default: videoList } = await import('~/static/video-list.json') + const { videosRelatedToApp } = await import('~/helpers/related.js') const app = appList.find(app => (app.slug === slug)) - const relatedVideos = [] + const relatedVideos = videosRelatedToApp(app) // Find other videos that also feature this video's app - for (const video of videoList) { - if (!video.apps.includes(app.slug)) continue + // for (const video of videoList) { + // if (!video.apps.includes(app.slug)) continue - relatedVideos.push(video) - } + // relatedVideos.push(video) + // } return { slug,