UNPKG

@shopgate/engage

Version:
6 lines 908 B
import{connect}from'react-redux';import{makeGetPrivacyPolicyLink}from'@shopgate/engage/page/selectors';import{getIsCookieConsentModalVisible}from"../../selectors/cookieConsent";import{acceptAllCookies,acceptRequiredCookies,openPrivacySettings}from"../../actions";/** * @return {Object} The extended component props. */var makeMapStateToProps=function makeMapStateToProps(){var getPrivacyPolicyLink=makeGetPrivacyPolicyLink();return function(state){return{isCookieConsentModalVisible:getIsCookieConsentModalVisible(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,acceptRequiredCookies:acceptRequiredCookies,openPrivacySettings:openPrivacySettings};export default connect(makeMapStateToProps,mapDispatchToProps);