From 5e6f78e6e752c52e373e49098931d43142bd7ab8 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sat, 9 Oct 2021 19:28:36 +0100 Subject: [PATCH] :fire: Removes provides from App.vue, replaced with Store --- src/App.vue | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/App.vue b/src/App.vue index cd30bed1..014a0652 100644 --- a/src/App.vue +++ b/src/App.vue @@ -11,8 +11,6 @@ import Header from '@/components/PageStrcture/Header.vue'; import Footer from '@/components/PageStrcture/Footer.vue'; import LoadingScreen from '@/components/PageStrcture/LoadingScreen.vue'; -// import { componentVisibility } from '@/utils/ConfigHelpers'; -import ConfigAccumulator from '@/utils/ConfigAccumalator'; import { welcomeMsg } from '@/utils/CoolConsole'; import ErrorHandler from '@/utils/ErrorHandler'; import { @@ -22,11 +20,6 @@ import { language as defaultLanguage, } from '@/utils/defaults'; -const Accumulator = new ConfigAccumulator(); -const config2 = Accumulator.config(); -// const visibleComponents = componentVisibility(config.appConfig) || defaultVisibleComponents; -const visibleComponents = defaultVisibleComponents; - export default { name: 'app', components: { @@ -34,15 +27,9 @@ export default { Footer, LoadingScreen, }, - provide: { - config: config2, - visibleComponents, - }, data() { return { isLoading: true, // Set to false after mount complete - showFooter: visibleComponents.footer, - visibleComponents, }; }, computed: { @@ -66,6 +53,9 @@ export default { sections() { return this.$store.getters.pageInfo; }, + visibleComponents() { + return this.$store.getters.visibleComponents; + }, }, created() { this.$store.dispatch('initializeConfig');