summaryrefslogtreecommitdiff
path: root/iridescence/src/store
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2020-11-17 08:30:38 -0500
committerAdam T. Carpenter <atc@53hor.net>2020-11-17 08:30:38 -0500
commit58c7f82c2cbf2f2ff3f5c2dd559e570924a41a4a (patch)
treee9891159578923b0cb825ab78ca3afbaea38e4ee /iridescence/src/store
parent1ec0fd99cdf48fa3db61c7580d4e80a2c5216ed8 (diff)
downloadtheglassyladies-58c7f82c2cbf2f2ff3f5c2dd559e570924a41a4a.tar.xz
theglassyladies-58c7f82c2cbf2f2ff3f5c2dd559e570924a41a4a.zip
Basic product detail without duplicating modals for each card.
Diffstat (limited to 'iridescence/src/store')
-rw-r--r--iridescence/src/store/index.js9
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;
},