Files
webgems/store/Sidebar.js
2019-07-25 19:58:01 -05:00

12 lines
268 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
}
}