diff options
Diffstat (limited to 'src/store/app.ts')
-rw-r--r-- | src/store/app.ts | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/store/app.ts b/src/store/app.ts new file mode 100644 index 000000000..2b470c946 --- /dev/null +++ b/src/store/app.ts @@ -0,0 +1,41 @@ +import { APPLICATION_MUTATION_TYPES } from '../types/MutationTypes' + +export const APPLICATION_ACTION_TYPES = { + SET_ERROR_MESSAGE: 'SET_ERROR_MESSAGE', +} + +export type AppInfoState = { + error?: Error; +} + +const state: AppInfoState = { + error: undefined, +} + +const getters = { + error(state: AppInfoState) { + return state.error + }, +} + +export const actions = { + // async [APPLICATION_ACTION_TYPES...]({ commit }: ActionParams) { + + // }, +} + +export const mutations = { + [APPLICATION_MUTATION_TYPES.SET_ERROR]( + state: AppInfoState, + error: Error, + ) { + state.error = error + }, +} + +export default { + state, + getters, + actions, + mutations, +} |