import List , { ListState } from './Hashtag/List' ; import Tag , { TagState } from './Hashtag/Tag' ; import { Module , ActionTree } from 'vuex' ; import { RootState } from '@/store' ; import { MyWindow } from '~/src/types/global' ; const win = ( window as any ) as MyWindow ; export type HashtagState = { } ; type HashtagModule = { List : ListState ; Tag : TagState ; } ; export type HashtagModuleState = HashtagModule & HashtagState ; const state = ( ) : HashtagState => ( { } ) ; const actions = { saveTag : async ( { dispatch } , tag ) => { await win . ipcRenderer . invoke ( 'save-hashtag' , tag ) ; dispatch ( 'TimelineSpace/SideMenu/listTags' , { } , { root : true } ) ; } } ; const Hashtag = { namespaced : true , modules : { List , Tag } , state : state , actions : actions } ; export default Hashtag ;