diff options
Diffstat (limited to 'src/store/index.ts')
-rw-r--r-- | src/store/index.ts | 40 |
1 files changed, 8 insertions, 32 deletions
diff --git a/src/store/index.ts b/src/store/index.ts index 177e23a94..5d599449b 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -1,9 +1,9 @@ -import { Commit } from "vuex"; +import { Commit, Store } from "vuex"; import { Folder } from '../types/Folder' import { Feed } from '../types/Feed' -import { FEED_MUTATION_TYPES, FEED_ACTION_TYPES, FEED_MUTATIONS, FEED_ACTIONS } from "./feed"; -import { FOLDER_MUTATION_TYPES, FOLDER_ACTION_TYPES, FOLDER_MUTATIONS, FOLDER_ACTIONS } from "./folder"; +import feeds, { FEED_MUTATION_TYPES, FEED_ACTION_TYPES } from "./feed"; +import folders, { FOLDER_MUTATION_TYPES, FOLDER_ACTION_TYPES } from "./folder"; export const MUTATIONS = { ... FEED_MUTATION_TYPES, @@ -23,34 +23,10 @@ export type AppState = { items: any[]; } -const state: AppState = { - feeds: [], - folders: [], - items: [] -} as AppState - -const getters = { - feeds (state: AppState) { - return state.feeds; - }, - folders (state: AppState) { - return state.folders; - }, -} - -const mutations = { - ... FEED_MUTATIONS, - ... FOLDER_MUTATIONS -} - -const actions = { - ... FEED_ACTIONS, - ... FOLDER_ACTIONS -} export default { - state, - mutations, - actions, - getters -}
\ No newline at end of file + modules: { + feeds, + folders + } +};
\ No newline at end of file |