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, props) => ({
disabled: !isProductOrderable(state, props) && !hasProductVariants(state, props),
loading: isProductPageLoading(state, props),
});
const mapStateToProps = (state, props) => ({
/**
* 1. Product has no variants and not orderable
* 2. Parent product can be not orderable but having orderable variants
*/
disabled: !isProductOrderable(state, props) && !hasProductVariants(state, props),
loading: isProductPageLoading(state, props),
});
const mapStateToProps = state => ({
isLoading: isProductPageLoading(state),
cartProductCount: getCartProductDisplayCount(state),
});
const mapStateToProps = state => ({
isLoading: isProductPageLoading(state),
isOrderable: isProductPageOrderable(state),
cartProductCount: selectActionCount(state),
});
const mapStateToProps = state => ({
isLoading: isProductPageLoading(state),
isOrderable: isProductPageOrderable(state),
isDisabled: !isProductOrderable(state) && !hasCurrentProductVariants(state),
isVisible: isVisible(state),
cartProductCount: selectActionCount(state),
});