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

Why does it not show in google chrome but it shows on safari. QTY selector. and problems with localstorage or [] #32

Closed
talmax1124 opened this issue Oct 19, 2020 · 8 comments

Comments

@talmax1124
Copy link

talmax1124 commented Oct 19, 2020

This is in chrome. I have various issues. For one I have the issue from above. It does not display anything for chrome. Then it is not updating the [] in applications > local storage and is not showing on state > tree. Is there any fixes? I am in lecture 33 (Add to functionality).

Repository: github.com/talmax1124/cduoshop

or you can email me at carlitosdiazplaza@gmail.com

@basir @bradtraversy ?

@talmax1124 talmax1124 changed the title Why does it not show in google chrome but it shows on safari. QTY selector. and problems with localstorage or [] Why does it not show in google chrome but it shows on safari. QTY selector. and problems with localstorage or [] Oct 19, 2020
@bradtraversy
Copy link
Owner

The qty selector happened to me at one point. I am pretty sure it is the Bootswatch theme. Try adding the standard Bootstrap CDN in your public/index.html file

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">

And comment out the bootswatch link in the index.js file. Let me know if you still can't see it

@talmax1124
Copy link
Author

talmax1124 commented Oct 19, 2020

The qty selector happened to me at one point. I am pretty sure it is the Bootswatch theme. Try adding the standard Bootstrap CDN in your public/index.html file

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">

And comment out the bootswatch link in the index.js file. Let me know if you still can't see it

I see the numbers now in the selector but in the console state > pin when I add an item to cart, it is not showing up in the tree. It stays blank. Also it is not showing in localstorage. I have watched the videos for about 5 times already.

Screen Shot 2020-10-19 at 4 40 39 PM

@bradtraversy @basir

@bradtraversy
Copy link
Owner

Can you link your repo or send your code/repo to support@traversymedia.com?

@talmax1124
Copy link
Author

Can you link your repo or send your code/repo to support@traversymedia.com?

I sent you an email with my email being carlitosdiazplaza@gmail.com

@talmax1124
Copy link
Author

@bradtraversy The repo is also in the top

@bradtraversy
Copy link
Owner

ok, two errors..

  1. In your cartScreen you are not getting the product id because you have

const productID = match.params.div

should be

const productID = match.params.id

  1. In your cart reducer in the else for if (existItem) you have the same
    thing happening as in the if. This should be
return {
          ...state,
          cartItems: [...state.cartItems, item],
        }

Check your code with the final repo

Please close any issues and q/a if this fixes it

@talmax1124
Copy link
Author

talmax1124 commented Oct 20, 2020

@bradtraversy Ok, yes now it shows in the state tree. How can I fix the the 3 errors in the console?
image

It only appears in Chrome. Do you know how to fix these errors?

@bradtraversy
Copy link
Owner

bradtraversy commented Oct 21, 2020

I am not sure why you are getting those errors, I did not get them when I ran your code. If you are still having issues, please post on Udemy q/a instead of github. This is not for student code issues, it is for bugs with the repo. Thanks :)

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

2 participants