Closed fiskryeziu closed 1 year ago
how are you proposing to correct that?
I will use the localstorage when adding item and when removing items from the cart. Also when reload we'll pass to intialState the datafrom localStorage if it's any otherwise return an empty array
done you can work on this, good luck
Issue Description:
I've encountered an issue where cart items are not persisting upon page reload. When a user adds items to their cart and then refreshes the page or navigates away and returns, the items in the cart are unexpectedly removed.
Steps to Reproduce:
Visit the ecommerce website. Browse products and add items to the shopping cart. Refresh the page or navigate away and return to the cart page.
Expected Behavior:
The items added to the cart should remain in the cart even after page reloads or navigation.
Actual Behavior:
Upon reloading the page or returning to the cart page, the items in the cart are removed, resulting in an empty cart.