Specify type for Account in MuteConfirm
This commit is contained in:
parent
2048006b95
commit
727ba21ffb
|
@ -1,10 +1,10 @@
|
||||||
import generator from 'megalodon'
|
import generator, { Entity } from 'megalodon'
|
||||||
import { Module, MutationTree, ActionTree } from 'vuex'
|
import { Module, MutationTree, ActionTree } from 'vuex'
|
||||||
import { RootState } from '@/store'
|
import { RootState } from '@/store'
|
||||||
|
|
||||||
export type MuteConfirmState = {
|
export type MuteConfirmState = {
|
||||||
modalOpen: boolean
|
modalOpen: boolean
|
||||||
account: Account | null
|
account: Entity.Account | null
|
||||||
}
|
}
|
||||||
|
|
||||||
const state = (): MuteConfirmState => ({
|
const state = (): MuteConfirmState => ({
|
||||||
|
@ -21,7 +21,7 @@ const mutations: MutationTree<MuteConfirmState> = {
|
||||||
[MUTATION_TYPES.CHANGE_MODAL]: (state, value: boolean) => {
|
[MUTATION_TYPES.CHANGE_MODAL]: (state, value: boolean) => {
|
||||||
state.modalOpen = value
|
state.modalOpen = value
|
||||||
},
|
},
|
||||||
[MUTATION_TYPES.CHANGE_ACCOUNT]: (state, account: Account) => {
|
[MUTATION_TYPES.CHANGE_ACCOUNT]: (state, account: Entity.Account) => {
|
||||||
state.account = account
|
state.account = account
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ const actions: ActionTree<MuteConfirmState, RootState> = {
|
||||||
changeModal: ({ commit }, value: boolean) => {
|
changeModal: ({ commit }, value: boolean) => {
|
||||||
commit(MUTATION_TYPES.CHANGE_MODAL, value)
|
commit(MUTATION_TYPES.CHANGE_MODAL, value)
|
||||||
},
|
},
|
||||||
changeAccount: ({ commit }, account: Account) => {
|
changeAccount: ({ commit }, account: Entity.Account) => {
|
||||||
commit(MUTATION_TYPES.CHANGE_ACCOUNT, account)
|
commit(MUTATION_TYPES.CHANGE_ACCOUNT, account)
|
||||||
},
|
},
|
||||||
submit: async ({ state, rootState, dispatch }, notify: boolean) => {
|
submit: async ({ state, rootState, dispatch }, notify: boolean) => {
|
||||||
|
|
Loading…
Reference in New Issue