import { call, put, } from 'redux-saga/effects'; import { ReduxActionTypes } from '../../constants/actionTypes'; import callApi from '../../apis'; function* runClockSaga() { const data = yield call(callApi); if (data) { yield put({ type: ReduxActionTypes.FETCH_DATA_SUC }); } else { yield put({ type: ReduxActionTypes.FETCH_DATA_FAL }); } } export default runClockSaga;