PLP complete - store updated, Cart partial complete and gh pages backup

This commit is contained in:
2020-03-27 13:31:24 +05:30
parent f8d0a04e54
commit c4a85afca3
102 changed files with 1008 additions and 318 deletions

View File

@@ -0,0 +1,33 @@
import React from 'react';
import PropTypes from 'prop-types';
import './ItemPrice.component.scss';
const ItemPrice = ({product}) => {
const hasDiscount = !!product.discount && product.discount !== 0
return (
<div className='c-ItemPrice'>
{product.discountedPrice && <span className="c-Plp__c-ProductContainer__c-ProductTile__price">&#x20B9;{product.discountedPrice}</span>}
{
hasDiscount &&
(
<React.Fragment>
<span className="c-ItemPrice__price--strikethrough"> {product.price}</span>
<span className="c-ItemPrice__discount">{product.discount}% off</span>
</React.Fragment>
)
}
</div>
);
};
ItemPrice.defaultProps = {
product: PropTypes.object
};
ItemPrice.propTypes = {
};
export default ItemPrice;