import { AnyAction } from "redux" ; export enum networkActions { SET_NETWORK = "SET_NETWORK" , SET_NETWORK_NAME = "SET_NETWORK_NAME" } const internalSetNetwork = ( network ) : AnyAction => { return { type : networkActions . SET_NETWORK , data : network , } ; } ; export const setNetwork = ( network ) : any => { return ( dispatch , getState ) : AnyAction => { return dispatch ( internalSetNetwork ( network ) ) ; } ; } ; export const setNetworkName = ( networkName ) : AnyAction => { return { type : networkActions . SET_NETWORK_NAME , data : networkName , } ; } ;