UNPKG

lml-main

Version:

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

20 lines 759 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const actions_1 = require("../../mapping/actions"); const initialmapDirectionsState = null; exports.mapDirectionsReducer = (state = initialmapDirectionsState, action) => { switch (action.type) { case actions_1.SHOW_DIRECTIONS: { return showDirections(state, action); } case actions_1.HIDE_DIRECTIONS: { return hideDirections(state, action); } default: { return state; } } }; const showDirections = (state, action) => (Object.assign({}, action.directions)); const hideDirections = (state, action) => (state && state.id === action.refId ? null : state); //# sourceMappingURL=directions.js.map