index.ts 382 B

123456789101112131415
  1. import { Dispatch } from 'react';
  2. // import { SET_CURRENT_PAGE } from '../constants/actionTypes';
  3. const applyMiddleware = (dispatch: Dispatch<any>) => (
  4. action: { type: string; payload?: any },
  5. ): void => {
  6. dispatch(action);
  7. // if (action.type === SET_CURRENT_PAGE) {
  8. // dispatch({type: UPDATE_RENDERING_QUEUE, payload: []});
  9. // }
  10. };
  11. export default applyMiddleware;