Get config from prop instead of definition

This commit is contained in:
Sam Carlton 2022-05-03 14:27:47 -05:00
parent ab11d74bfd
commit 3ac2653443
2 changed files with 9 additions and 1 deletions

View file

@ -192,6 +192,12 @@ export default {
LinkButton,
AllUpdatesSubscribe
},
props: {
config: {
type: Object,
default: null
}
},
data: function () {
return {
query: '',
@ -295,7 +301,7 @@ export default {
// Bring in code
const { default: AppFilesScanner } = await import('~/helpers/app-files-scanner.js')
const testResultStore = isNuxt( this ) ? this.$config.testResultStore : global.$config.testResultStore
const testResultStore = this.config ? this.config.testResultStore : this.$config.testResultStore
// Initialize instance
this.scanner = new AppFilesScanner({

View file

@ -11,6 +11,7 @@ import AppTestPage from '~/pages/apple-silicon-app-test.vue'
// Full Astro Component Syntax:
// https://docs.astro.build/core-concepts/astro-components/
---
<Layout
headOptions={ {
@ -26,6 +27,7 @@ import AppTestPage from '~/pages/apple-silicon-app-test.vue'
>
<AppTestPage
config={ global.$config }
client:load
/>