Features
- Users able to increase and decrease the product quantity.
- Based on product quantity, the product's actual price and offer price will be updated.
- Actual price is calculated from the product's discount percentage, using below formula,
const actualPrice = (product.quantity || 1) * product.price + (((product.quantity || 1) * product.price) * (product.discountPercentage / 100)) - User can remove the product from cart.
- There is section called total and subtotal price of all products, based on the above actions, total price or subtotal price will be updated.
- From the UI perspective, Implemented Dark and Light Mode.
Created using: React.js, Chakra UI, Tailwind CSS, Context API
Please find the deployed url below
https://react-shoppingcart-contextapi.netlify.app