import { takeEvery, fork, put, call } from 'redux-saga/effects';
import { AxiosResponse } from 'axios';
import { ReducerAction } from 'types/application';
import { Result } from 'types/table';
import { getLeaves, getEvaluations } from 'services/sis';
function* workerFetchLeaveList(action: ReducerAction) {
const response: AxiosResponse<Array<Result>> = yield call(getLeaves);
type: FETCH_LEAVE_LIST_SUCCESS,
payload: response.data || []
type: FETCH_LEAVE_LIST_ERROR,
function* watcherFetchLeaveList() {
yield takeEvery(FETCH_LEAVE_LIST, workerFetchLeaveList);
export default [fork(watcherFetchLeaveList)];