ieeemysight4rehab/ieeemysight4rehab.github.io

View on GitHub
src/store.js

Summary

Maintainability
A
0 mins
Test Coverage
F
50%
import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    drawer: false,
    items: [ 
      { text: 'Home', to: '/', icon:'home'},
      { text: 'About', to: '/about', icon: 'toc'},
      { text: 'Achievements', to: '/achievements', icon: 'star'},
      { text: 'Team', to: '/team', icon:'group'},
      { text: 'Contact', to: '/contact', icon:'person'}
    ]
  },
  getters:{
    links: (state) => {
      return state.items
    }
  },
  mutations: {
    setDrawer: (state, payload) => (state.drawer = payload),
    toggleDrawer: state => (state.drawer = !state.drawer)
  },
  actions: {

  }
})