export default {
    state: {
        userInfo: {}
    },
    mutations: {
        SET_USER_INFO(state, userData) {
            state.userInfo = userData
            sessionStorage.setItem('userInfo', JSON.stringify(userData))
        },
        CLEAR_USER_INFO(state) {
            state.userInfo = {}
            sessionStorage.removeItem('userInfo')
        }
    },
    getters: {
        userInfo: (state) => state.userInfo
    }
}