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