@shopgate/pwa-common-commerce
Version:
Commerce library for the Shopgate Connect PWA.
14 lines (13 loc) • 547 B
JavaScript
import { ERROR_UPDATE_PRODUCTS_IN_CART } from "../constants";
/**
* Creates the dispatched ERROR_UPDATE_PRODUCTS_IN_CART action object.
* @param {Array} updateData The update data from the failed UPDATE_PRODUCTS_IN_CART action.
* @param {PipelineErrorElement[]} [errors] A list of errors messages for the products.
* @returns {Object} The dispatched action object.
*/
const errorUpdateProductsInCart = (updateData, errors = []) => ({
type: ERROR_UPDATE_PRODUCTS_IN_CART,
updateData,
errors
});
export default errorUpdateProductsInCart;