search.ts 405 B

123456789101112
  1. import * as types from '../constants/actionTypes';
  2. const actions: ActionType = (dispatch) => ({
  3. setQueryString: (state) =>
  4. dispatch({ type: types.SET_QUERY_STRING, payload: state }),
  5. setCurrentIndex: (state) =>
  6. dispatch({ type: types.SET_CURRENT_INDEX, payload: state }),
  7. setMatchesMap: (state) =>
  8. dispatch({ type: types.SET_MATCHES_MAP, payload: state }),
  9. });
  10. export default actions;