Jamming project: page reloading every search, returning nothing

Jamming

Hi all!

I’m having a bit of trouble with the Jamming project, my search and add playlist buttons do not seem to be working properly. The first time i use them it takes me to the page to log into spotify etc but afterwards using the buttons just refreshes the page, gives me a 401 GET error on the console, and doesnt provide any search results:

XHR GEThttps://api.spotify.com/v1/search?type=track&q=the beatles [HTTP/3 401 Unauthorized 58ms]

Ive followed along with the video instructions at the relevant stages but I don’t appear to have done anything wrong.
Any help would be greatly appreciated! I’ll include the code from searchBar.js, searchResults.js, Spotify.js, and app.js (apologies for the screenshots, for some reason the forums wont let me upload code.


SearchResults

I am having more or less the same issue. After pressing Search button, the page just realods with no other action apparently happening there. Would appreciate an insight from someone more experienced:-)

1 Like

please paste your code as text and not images, and I’ll see if i can find the problem you’re experiencing.