UNPKG

lml-main

Version:

This is now a mono repository published into many standalone packages.

17 lines 898 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var redux_observable_1 = require("redux-observable"); var cosmoui_1 = require("cosmoui"); var lodash_1 = require("lodash"); var actions_1 = require("../actions"); exports.fetchPlacesSuccess = function (action$, store) { return action$.ofType(actions_1.FETCH_PLACES.SUCCESS).map(function (action) { var places = action.result.places; return actions_1.setPlaces(lodash_1.keyBy(places, function (place) { return place.placeId; })); }); }; exports.fetchPlacesError = function (action$, store) { return action$.ofType(actions_1.FETCH_PLACES.ERROR).mapTo(cosmoui_1.notificationError('There was a problem fetching places. Please try again')); }; exports.fetchPlacesEpics = redux_observable_1.combineEpics(exports.fetchPlacesSuccess, exports.fetchPlacesError); //# sourceMappingURL=fetch-places.js.map