@shopgate/pwa-common-commerce
Version:
Commerce library for the Shopgate Connect PWA.
8 lines • 610 B
JavaScript
import{RECEIVE_REVIEWS}from"../constants";/**
* Dispatches the RECEIVE_REVIEWS action.
* @param {string} hash Generated hash for an entity.
* @param {string} productId The ID of the product.
* @param {Array} reviews The received review data.
* @param {number} totalReviewCount The total number of reviews for a product.
* @returns {Object} The RECEIVE_PRODUCT_REVIEWS action.
*/var receiveReviews=function receiveReviews(hash,productId,reviews,totalReviewCount){return{type:RECEIVE_REVIEWS,hash:hash,productId:productId,reviews:reviews,totalReviewCount:totalReviewCount};};export default receiveReviews;