18.03 Vuex - Create an Auth Store

This commit is contained in:
Fredrick W. Warren 2021-02-12 21:54:55 -08:00
parent bcfc3e0251
commit 6ec3e3ad11
2 changed files with 22 additions and 1 deletions

View File

@ -3,6 +3,7 @@ import Vuex from 'vuex'
import tasks from './store-tasks' import tasks from './store-tasks'
import settings from './store-settings' import settings from './store-settings'
import auth from './store-auth'
Vue.use(Vuex) Vue.use(Vuex)
@ -19,7 +20,8 @@ export default function (/* { ssrContext } */) {
const Store = new Vuex.Store({ const Store = new Vuex.Store({
modules: { modules: {
tasks, tasks,
settings settings,
auth
}, },
// enable strict mode (adds overhead!) // enable strict mode (adds overhead!)

19
src/store/store-auth.js Normal file
View File

@ -0,0 +1,19 @@
const state = {
}
const mutations = {
}
const actions = {
}
const getters = {
}
export default {
namespaced: true,
state,
mutations,
actions,
getters
}