UNPKG

@looker/embed-components

Version:
24 lines 608 B
import { put, takeEvery } from 'typed-redux-saga'; import { createFactory } from '@looker/embed-services'; import { factoryActions } from './slice'; function* initSaga(action) { var { initFactorySuccessAction, setFailureAction } = factoryActions; try { createFactory(action.payload.sdk); yield* put(initFactorySuccessAction()); } catch (error) { yield* put(setFailureAction({ error: error.message })); } } export function* saga() { var { initFactoryAction } = factoryActions; yield* takeEvery(initFactoryAction, initSaga); } //# sourceMappingURL=sagas.js.map