main.ts 611 B

12345678910111213
  1. import * as types from '../constants/actionTypes';
  2. const actions: ActionType = (dispatch) => ({
  3. toggleDisplayMode: (state) =>
  4. dispatch({ type: types.TOGGLE_DISPLAY_MODE, payload: state }),
  5. setNavbar: (state) => dispatch({ type: types.SET_NAVBAR, payload: state }),
  6. setSidebar: (state) => dispatch({ type: types.SET_SIDEBAR, payload: state }),
  7. setTool: (state) => dispatch({ type: types.SET_TOOL, payload: state }),
  8. setInfo: (state) => dispatch({ type: types.SET_INFO, payload: state }),
  9. setLoading: (state) => dispatch({ type: types.SET_LOADING, payload: state }),
  10. });
  11. export default actions;