debian-mirror-gitlab/app/assets/javascripts/search/store/index.js

19 lines
434 B
JavaScript
Raw Normal View History

2021-01-03 14:25:43 +05:30
import Vue from 'vue';
import Vuex from 'vuex';
2021-01-29 00:20:46 +05:30
import * as actions from './actions';
2021-09-30 23:02:18 +05:30
import * as getters from './getters';
2021-01-29 00:20:46 +05:30
import mutations from './mutations';
2021-01-03 14:25:43 +05:30
import createState from './state';
Vue.use(Vuex);
export const getStoreConfig = ({ query }) => ({
2021-01-29 00:20:46 +05:30
actions,
2021-09-30 23:02:18 +05:30
getters,
2021-01-29 00:20:46 +05:30
mutations,
2021-01-03 14:25:43 +05:30
state: createState({ query }),
});
2021-03-08 18:12:59 +05:30
const createStore = (config) => new Vuex.Store(getStoreConfig(config));
2021-01-03 14:25:43 +05:30
export default createStore;