export const state = { title: '', info: null } export const mutations = { setTitle (state, title) { state.title = title }, setInfo (state, info) { state.info = info } } export const actions = { setTitle ({ commit }, title) { commit('setTitle', title) document.title = title }, setInfo ({ commit, dispatch }, info) { commit('setInfo', info) dispatch('setTitle', info.home?.title || '') } }