CleverProgrammers/react-challenge-amazon-clone

Need a help with connection to basket

Opened this issue · 3 comments

Hello guys! First thank you so much for great tutorial, it's very valuable. I also need a help with connection to basket. Till 2:20:42 everything worked perfectly, on the Home page items adding to basket, but when I'm going to Checkout page it's go to 0 again. Subtotal (0 items) doesn't work as well. Maybe anyone had the same issue? Thank you!

I'm FACING the same issue

use {basket.length} in currency format to update number of items and use :
export const getBasketTotal = (basket) =>
basket?.reduce((amount, item) => item.price + amount, 0);
in reducer.js to update basket amount.

use {basket.length} in currency format to update number of items and use : export const getBasketTotal = (basket) => basket?.reduce((amount, item) => item.price + amount, 0); in reducer.js to update basket amount.

can you please clear where i have to use {basket.length} in currency format

and rest of the code i updated and it still shows error
Screenshot 2022-09-26 200620