blob: 2b470c9469ea2dce2be35bbce8a5fad5977079f6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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,
}
|