
Design comparison
Please log in to post a comment
Log in with GitHubCommunity feedback
- @mathematiCode
Nice Job! I had never heard of react-use-cart so that was interesting to see how you used that! It seems that your Confirm Order button isn't working. I don't see any onClick on that button in your code. I used Headless UI to make my modal.
Also make sure if you have an image that you're using as a button that you wrap it in a button tag instead of a div so it's keyboard accessible for users that are unable to use a mouse. Like this but you'd also have to get rid of the default background color that comes with buttons.
<button className="border rounded-full p-2 cursor-pointer" onClick={() => updateItemQuantity(product.id, isInCart.quantity - 1)}> <img src="./assets/images/icon-decrement-quantity.svg"/> </button>
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord