Specify type for Account in MuteConfirm

This commit is contained in:
AkiraFukushima 2021-02-04 11:00:18 +09:00
parent 2048006b95
commit 727ba21ffb
1 changed files with 4 additions and 4 deletions

View File

@ -1,10 +1,10 @@
import generator from 'megalodon'
import generator, { Entity } from 'megalodon'
import { Module, MutationTree, ActionTree } from 'vuex'
import { RootState } from '@/store'
export type MuteConfirmState = {
modalOpen: boolean
account: Account | null
account: Entity.Account | null
}
const state = (): MuteConfirmState => ({
@ -21,7 +21,7 @@ const mutations: MutationTree<MuteConfirmState> = {
[MUTATION_TYPES.CHANGE_MODAL]: (state, value: boolean) => {
state.modalOpen = value
},
[MUTATION_TYPES.CHANGE_ACCOUNT]: (state, account: Account) => {
[MUTATION_TYPES.CHANGE_ACCOUNT]: (state, account: Entity.Account) => {
state.account = account
}
}
@ -30,7 +30,7 @@ const actions: ActionTree<MuteConfirmState, RootState> = {
changeModal: ({ commit }, value: boolean) => {
commit(MUTATION_TYPES.CHANGE_MODAL, value)
},
changeAccount: ({ commit }, account: Account) => {
changeAccount: ({ commit }, account: Entity.Account) => {
commit(MUTATION_TYPES.CHANGE_ACCOUNT, account)
},
submit: async ({ state, rootState, dispatch }, notify: boolean) => {