⚡ Remove all instances of inject, replace with VueX store
This commit is contained in:
@@ -3,6 +3,7 @@ import Vue from 'vue';
|
||||
import Vuex from 'vuex';
|
||||
import Keys from '@/utils/StoreMutations';
|
||||
import ConfigAccumulator from '@/utils/ConfigAccumalator';
|
||||
import { componentVisibility } from '@/utils/ConfigHelpers';
|
||||
|
||||
Vue.use(Vuex);
|
||||
|
||||
@@ -25,6 +26,12 @@ const store = new Vuex.Store({
|
||||
sections(state) {
|
||||
return state.config.sections || [];
|
||||
},
|
||||
webSearch(state, getters) {
|
||||
return getters.appConfig.webSearch || {};
|
||||
},
|
||||
visibleComponents(state, getters) {
|
||||
return componentVisibility(getters.appConfig);
|
||||
},
|
||||
},
|
||||
mutations: {
|
||||
[UPDATE_CONFIG](state, config) {
|
||||
|
||||
Reference in New Issue
Block a user