Files
webgems/store/Sidebar.js
2019-07-24 21:04:10 -05:00

11 lines
263 B
JavaScript

export const state = () => ({
cardsShown: true
})
export const mutations = {
toggleCardsShown (state) {
console.log(state.cardsShown)
if (process.browser) localStorage.setItem('cardsShown', !state.cardsShown)
state.cardsShown = !state.cardsShown
}
}