import axios from "axios"
import { put, takeLatest } from "redux-saga/effects"
import { actions, t } from "./actions"
const baseUrl = "host/user/phone"
function* loadUserData(action) {
const response = yield axios.get(${baseUrl}/${action.name})
yield put(actions.loadUserDataSuccess(response.data))
}
export function* watchLoadUserData() {
yield takeLatest(t.LOAD_USER_DATA, loadUserData)
}
Here inline 8 in the response variable, I want to pass for both email and phone URL so that I can search for the result through one search box at once.