Skip to content

Need a help with connection to basket #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
katya2108 opened this issue Aug 22, 2022 · 3 comments
Open

Need a help with connection to basket #54

katya2108 opened this issue Aug 22, 2022 · 3 comments

Comments

@katya2108
Copy link

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!

@prateek-gupta-hacker
Copy link

I'm FACING the same issue

@Triamb-Talwar
Copy link

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.

@prateek-gupta-hacker
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants