import { all , takeLatest } from "redux-saga/effects" ; import { getType } from "typesafe-actions" ; import DebugConfig from "../Config/DebugConfig" ; import FixtureAPI from "../Services/FixtureApi" ; import { createAPI , GithubApi } from "../Services/GithubApi" ; import { GithubActions } from "../Reducers/GithubReducers" ; import { StartupActions } from "../Reducers/StartupReducers" ; import { getUserAvatar } from "./GithubSagas" ; import { startup } from "./StartupSagas" ; const api = DebugConfig . useFixtures ? FixtureAPI : createAPI ( ) ; export default function * root ( ) { yield all ( [ takeLatest ( getType ( StartupActions . startup ) , startup ) , takeLatest ( getType ( GithubActions . userRequest ) , getUserAvatar , api ) , ] ) ; }