Skip to content
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

Updated toggleCartItemQuantity #34

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Deni-ux
Copy link

@Deni-ux Deni-ux commented Jun 5, 2022

the decrementing else if state, when tested, would show 'NaN' on cart preview. I used map() in setCartItems instead of the splice() method and it works.

the decrementing if state, when tested, would show 'NaN'  on cart preview. I used mapping in setCartItems instead of the splicing method and it works.
@vercel
Copy link

vercel bot commented Jun 5, 2022

Someone is attempting to deploy a commit to a Personal Account owned by @adrianhajdin on Vercel.

@adrianhajdin first needs to authorize it.

@lekolawole
Copy link

I also added if(foundProduct.quantity - 1 < 1) return 1; on the else if statement for (value === 'dec') right before the rest of the code. Worked out perfectly.

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

Successfully merging this pull request may close these issues.

None yet

2 participants