@shopgate/engage
Version:
Shopgate's ENGAGE library.
6 lines • 978 B
JavaScript
import{connect}from'react-redux';import{makeGetPrivacyPolicyLink}from'@shopgate/engage/page/selectors';import{acceptAllCookies,acceptSelectedCookies}from"../../actions";import{getAreComfortCookiesAcceptedInternal,getAreStatisticsCookiesAcceptedInternal}from"../../selectors/cookieConsent";/**
* @return {Object} The extended component props.
*/var makeMapStateToProps=function makeMapStateToProps(){var getPrivacyPolicyLink=makeGetPrivacyPolicyLink();return function(state){return{comfortCookiesAcceptedState:getAreComfortCookiesAcceptedInternal(state),statisticsCookiesAcceptedState:getAreStatisticsCookiesAcceptedInternal(state),privacyPolicyLink:getPrivacyPolicyLink(state)};};};/**
* Connects the dispatch function to a callable function in the props.
* @return {Object} The extended component props.
*/var mapDispatchToProps={acceptAllCookies:acceptAllCookies,acceptSelectedCookies:acceptSelectedCookies};export default connect(makeMapStateToProps,mapDispatchToProps);