diff options
Diffstat (limited to 'iridescence/src/store/index.js')
-rw-r--r-- | iridescence/src/store/index.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/iridescence/src/store/index.js b/iridescence/src/store/index.js index 30f6cbf..dabcf31 100644 --- a/iridescence/src/store/index.js +++ b/iridescence/src/store/index.js @@ -11,12 +11,16 @@ export default new Vuex.Store({ searchTerm: "", products: [], busy: false, - compare: a => (a.featured ? -1 : 1) + compare: a => (a.featured ? -1 : 1), + productDetailId: 0 }, getters: { busy(state) { return state.busy; }, + productDetailId(state) { + return state.productDetailId; + }, products(state) { return state.products .filter(item => { @@ -31,6 +35,9 @@ export default new Vuex.Store({ toggleBusy(state) { state.busy = !state.busy; }, + productDetailId(state, id) { + state.productDetailId = id; + }, compare(state, compare) { state.compare = compare; }, |