From 58c7f82c2cbf2f2ff3f5c2dd559e570924a41a4a Mon Sep 17 00:00:00 2001 From: "Adam T. Carpenter" Date: Tue, 17 Nov 2020 08:30:38 -0500 Subject: Basic product detail without duplicating modals for each card. --- iridescence/src/store/index.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'iridescence/src/store') 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; }, -- cgit v1.2.3