123456789101112131415161718 |
- import * as types from '../constants/actionTypes';
- const actions: ActionType = dispatch => ({
- toggleDisplayMode: (state: string): void =>
- dispatch({ type: types.TOGGLE_DISPLAY_MODE, payload: state }),
- setNavbar: (state: string): void =>
- dispatch({ type: types.SET_NAVBAR, payload: state }),
- setSidebar: (state: string): void =>
- dispatch({ type: types.SET_SIDEBAR, payload: state }),
- setTool: (state: string): void =>
- dispatch({ type: types.SET_TOOL, payload: state }),
- setInfo: (state: Record<string, any>): void =>
- dispatch({ type: types.SET_INFO, payload: state }),
- setLoading: (state: boolean): void =>
- dispatch({ type: types.SET_LOADING, payload: state }),
- });
- export default actions;
|