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); + } } });