Design comparison
Community feedback
- @Captressketh001Posted about 2 years ago
@devvsakib, I want to say well done on completing this task. But I have the following comments to make on the solutions
-
The solution is not responsive on all screen size. I noticed that you used bootstrap for the layout. Just learn how to use the bootstrap breakpoints to achieve responsiveness
-
I cannot delete the item in the cart too. You can use the following code to achieve it. create a cart array to hold the items in the cart. Loop through the product and check if the product id is equal to the one you want to remove and if yes, remove it from the cart array.
removeProduct(product){ this.products.forEach((i, index) => { if (i.id == product.id) { this.cart.splice(index, 1) } }) }
I hope this will help
0 -
Please log in to post a comment
Log in with GitHubJoin 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