mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Started a store
This commit is contained in:
21
frontend/modules/playerModule.js
Normal file
21
frontend/modules/playerModule.js
Normal file
@@ -0,0 +1,21 @@
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
player: undefined
|
||||
},
|
||||
getters: {
|
||||
player: (state) => {
|
||||
return state.player;
|
||||
}
|
||||
},
|
||||
mutations: {
|
||||
SET_PLAYER: (state, player) => {
|
||||
state.player = player;
|
||||
}
|
||||
},
|
||||
actios: {
|
||||
setPlayer({ commit }, player) {
|
||||
commit('SET_PLAYER', player)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user