Currently we are calculating the final price on the frontend, which might create some vulnerabilites.
Instead it can be directly calculated on the backend and passed with GET request
The user can be allowed to add products directly to their carts, and thus it will reflect both in the cart count on navbar and update on the cart page as well, along with the price tally.
Noticed that the GET request to obtain categories and products are currently being done within the context itself, when it could be done locally within the same component as it's state is not being shared anywhere else
We can create a new feature, which allows the user of our ecommerce website to store their preferred items, that they might not want to purchase now but at a later time.
Expected to be able to store the product, and should be updated wherever needed, including the wishlist counter in the navbar.
Noticed that the current implementation of loader state for all 3 cards (Product, Wishlist and Cart) are using the same shared context state,
This firstly might go against the concept of a global shared state with context
This results in one API request triggering loader for all cards on the page
This issue is more apparent and visible on the cart page, when user tries to either remove the product or move to wishlist
Suggestions:
Have separate state for all 3 cards, will result in repetitive states but each will be unique to only that card, ensuring each component is triggered does not affect other children
The products shown to user on the website should be filterable.
If a user clicks on any of the filters, the products being shown should update accordingly
Add functionality to filters, and products should update accordingly