@shopgate/engage
Version:
Shopgate's ENGAGE library.
8 lines • 862 B
JavaScript
function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}import*as Redux from'redux';import{STORE_FORM_INPUT}from"../constants";/**
* TODO: Move to a different state / has nothing to do with locations.
*
* Stores the user's reserve form input
* @param {Object} state The current state.
* @param {Object} action The action object.
* @return {Object} The new state.
*/export default function formInput(){var state=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var action=arguments.length>1?arguments[1]:undefined;switch(action.type){case STORE_FORM_INPUT:return _extends({},state,{},action.input);default:return state;}}