import { store } from '../' ; import { CLOSE_DIALOG , DIALOG , OPEN_DIALOG , SET_DIALOG_ERROR } from './types' ; export const closeDialog = ( ) => { store . dispatch ( { type : CLOSE_DIALOG , } ) ; } ; export const setDialogError = ( error ) => { store . dispatch ( { type : SET_DIALOG_ERROR , payload : error , } ) ; } ; export const openDialog = ( name , data ? ) => { store . dispatch ( { type : OPEN_DIALOG , payload : { name , data , } , } ) ; } ;