summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/import_projects/store/index.js
blob: 7ba12f81eb963bb58e2b263621f5d57efdd5a909 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import Vue from 'vue';
import Vuex from 'vuex';
import state from './state';
import actionsFactory from './actions';
import * as getters from './getters';
import mutations from './mutations';

Vue.use(Vuex);

export default ({ initialState, endpoints, hasPagination }) =>
  new Vuex.Store({
    state: { ...state(), ...initialState },
    actions: actionsFactory({ endpoints, hasPagination }),
    mutations,
    getters,
  });