From 6a70d2e0bfe4dd4b48cc954433df24594dc6c95c Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Fri, 27 Nov 2020 23:21:24 -0600 Subject: [PATCH] Add Homebrew Formulae to index list --- pages/index.vue | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/pages/index.vue b/pages/index.vue index 1e14be7..36fc033 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -9,7 +9,8 @@ @@ -37,22 +38,17 @@ import Search from '~/components/search.vue' 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' - -// console.log('appList.length', appList.length) -// console.log('gameList.length', gameList.length) - -const sortedAppList = appList.sort(byTimeThenNull) - -const mergedList = [ - ...sortedAppList, - ...gameList -] - export default { + async asyncData () { + // const { default: appList } = await import('~/static/app-list.json') + // const { default: gamelist } = await import('~/static/game-list.json') + + const { allList } = await import('~/helpers/get-list.js') + + return { + allList + } + }, components: { Search, LinkButton @@ -61,11 +57,6 @@ export default { return { query: '', } - }, - computed: { - appList() { - return mergedList - } } }