From 6f8ee3e4d6bb000c399516a7d0c685dacc0ff4c0 Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Fri, 27 Nov 2020 15:06:00 -0600 Subject: [PATCH] Add games to kind endpoints --- pages/kind/_slug.vue | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pages/kind/_slug.vue b/pages/kind/_slug.vue index 064ef37..c07fc95 100644 --- a/pages/kind/_slug.vue +++ b/pages/kind/_slug.vue @@ -44,6 +44,12 @@ import LinkButton from '~/components/link-button.vue' import { byTimeThenNull } from '~/helpers/sort-list.js' import appList from '~/static/app-list.json' +import gamelist from '~/static/game-list.json' + +const allList = [ + ...appList.sort(byTimeThenNull), + ...gamelist, +] export default { async asyncData ({ params: { slug } }) { @@ -64,19 +70,19 @@ export default { }, computed: { section () { - return appList.find(app => { + return allList.find(app => { return app.section.slug === this.slug }).section }, sectionAppList () { - const list = appList.filter(app => { + const filteredList = allList.filter(app => { return app.section.slug === this.slug }) - const sortedList = list.sort(byTimeThenNull) + // const sortedList = list.sort(byTimeThenNull) - return sortedList + return filteredList }, supportedAppList () { return this.sectionAppList.filter(app => {