import * as types from '../constants/actionTypes';

const actions: ActionType = (dispatch) => ({
  setQueryString: (state) =>
    dispatch({ type: types.SET_QUERY_STRING, payload: state }),
  setCurrentIndex: (state) =>
    dispatch({ type: types.SET_CURRENT_INDEX, payload: state }),
  setMatchesMap: (state) =>
    dispatch({ type: types.SET_MATCHES_MAP, payload: state }),
});

export default actions;
