Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const mapStateToProps = (state) => {
const hasCartItems = getCartItems(state).length > 0;
return {
showCouponsHint: hasCartItems && !hasCouponSupport(state),
showTaxDisclaimer: hasCartItems && showTaxDisclaimer,
};
};
const mapStateToProps = state => ({
isUserLoggedIn: isUserLoggedIn(state),
cartItems: getCartItems(state),
messages: getCartMessages(state),
currency: getCurrency(state),
});
const mapStateToProps = state => ({
cartItems: getCartItems(state),
isLoading: isViewLoading(state, CART_PATH),
messages: getCartMessages(state),
});
const mapStateToProps = state => ({
cartItems: getCartItems(state),
messages: getCartMessages(state),
});
const mapStateToProps = (state) => {
const hasCartItems = getCartItems(state).length > 0;
return {
showCouponsHint: hasCartItems && !hasCouponSupport(state),
showTaxDisclaimer: hasCartItems && showTaxDisclaimer,
};
};