Import generated app list into app pages

This commit is contained in:
Sam Carlton 2020-09-19 15:01:39 -05:00
parent 55f5fda670
commit 678e8697f8

View file

@ -19,25 +19,25 @@
<script> <script>
import Logo from '~/components/Logo.vue' import Logo from '~/components/Logo.vue'
import buildAppList from '~/helpers/build-app-list' import appList from '~/assets/app-list.json'
// import buildAppList from '~/helpers/build-app-list'
console.log('appList', appList)
export default { export default {
components: { components: {
Logo Logo
}, },
async asyncData ({ params: { slug }, error, payload }) { async asyncData ({ params: { slug } }) {
const appList = (payload) ? payload : await buildAppList()
return { return {
slug, slug
appList
} }
}, },
computed: { computed: {
app () { app () {
// console.log('context', this.slug) // console.log('context', this.slug)
return this.appList.find(app => (app.slug === this.slug)) return appList.find(app => (app.slug === this.slug))
} }
} }
} }