From fc113c2f3fd8b88d038943bc0611c3b27497c103 Mon Sep 17 00:00:00 2001 From: busti Date: Thu, 14 Nov 2019 04:14:47 +0100 Subject: [PATCH] change the event accordingly --- src/components/Navbar.vue | 12 ++++++------ src/store/index.js | 14 +++++++++++++- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/components/Navbar.vue b/src/components/Navbar.vue index 550fa71..a6a206f 100644 --- a/src/components/Navbar.vue +++ b/src/components/Navbar.vue @@ -7,7 +7,7 @@ @@ -38,7 +38,7 @@ diff --git a/src/store/index.js b/src/store/index.js index a3bab1b..ede6c69 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -6,6 +6,18 @@ Vue.use(Vuex); export default new Vuex.Store({ state: { events: ['35c3', 'camp19', '36c3'], - activeEvent: '35c3' + activeEvent: '36c3', + loadedItems: [] + }, + mutations: { + changeEvent(state, event) { + state.activeEvent = event; + } + }, + actions: { + changeEvent({ commit }, event) { + // todo: load items from server + commit('changeEvent', event); + } } });