-
Notifications
You must be signed in to change notification settings - Fork 244
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
Individual item name and price are overwritten on each new addition. #5
Comments
Hey there , |
@1-SubhamSingh I am also a contributor, this was actually an issue found by me and I wanted to ask the project owner to assign this to me. |
@rees8 Ohh !! fine |
@rees8 please add snippet of code in comment. |
in menu.js:
Modified version:
The ultimate functionality remains the same as the cart.js file is managing the process, but this small change should streamline the item addition process and is also better from the code readability point of view. |
@rees8 go ahead |
Thank you. A small request though: Could you also add the hacktoberfest label to this if it is applicable? It was mentioned in the meet to remind the project owner if the tag was missing. |
Modified the existing code to store the saved items in an array to streamline the process @Anjaliavv51 #5
Problem: On adding a new item, the item details are being overwritten each time in the menu.js file.
Solution: We can make use of an array to store each item as it is being added into the cart so as to not lose the item list.
@Anjaliavv51 I would like to work on this, would be grateful if you could assign it to me.
The text was updated successfully, but these errors were encountered: