whyczyk
2022-03-02 d6a8de9744f60c5f09f18ffe349bbc1e4fc1405c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
const state = {
  newPlatform: sessionStorage.getItem('newPlatform') || 0
}
 
const mutations = {
  setNewPlatform: (state, newPlatform) => {
    sessionStorage.setItem('newPlatform', newPlatform)
    state.newPlatform = Number(newPlatform)
  }
}
 
const actions = {
  setNewPlatform({ commit }, device) {
    commit('setNewPlatform', device)
  }
}
 
export default {
  namespaced: true,
  state,
  mutations,
  actions
}