Nuxt/examples/middleware/store/index.js
Sébastien Chopin 1d0493c0c1 Fix paths
2017-07-08 19:58:07 +02:00

13 lines
183 B
JavaScript

export const state = () => ({
visits: []
})
export const mutations = {
ADD_VISIT (state, path) {
state.visits.push({
path,
date: new Date().toJSON()
})
}
}