Total Complexity | 1 |
Complexity/F | 1 |
Lines of Code | 25 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import Vue from 'vue' |
||
2 | import Vuex from 'vuex' |
||
3 | |||
4 | import { createActions } from './actions' |
||
5 | import mutations from './mutations' |
||
6 | |||
7 | Vue.use(Vuex) |
||
8 | |||
9 | export function createStore(route) { |
||
10 | const actions = createActions(route) |
||
11 | |||
12 | return new Vuex.Store({ |
||
13 | state: { |
||
14 | counters: { |
||
15 | newPostsCount: 0, |
||
16 | pendingPostsCount: 0, |
||
17 | publishedPostsCount: 0, |
||
18 | activeUsersCount: 0, |
||
19 | formSubmissionsCount: 0 |
||
20 | } |
||
21 | }, |
||
22 | actions, |
||
23 | mutations |
||
24 | }) |
||
25 | } |
||
26 |