1
1
mirror of https://github.com/aelve/guide.git synced 2024-12-25 22:02:58 +03:00
guide/front/client/store/index.ts
avele da9031a6ba
Feat/preload pages on client and progress bar (#266)
* progress bar

* Using saved scroll when going forward/back  in browser

* router intance added to context of client side asyncData functions
2019-02-10 16:00:50 +04:00

29 lines
553 B
TypeScript

import Vuex from 'vuex'
import category from 'client/store/modules/category'
import categoryItem from 'client/store/modules/categoryItem'
import wiki from 'client/store/modules/wiki'
function createStore () {
// TODO loggins mutations in dev
return new Vuex.Store({
state: {
isPageLoading: false
},
actions: {},
mutations: {
tooglePageLoading (state) {
state.isPageLoading = !state.isPageLoading
}
},
modules: {
category,
categoryItem,
wiki
}
})
}
export {
createStore
}