MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / loadGenres

Function loadGenres

assets/js/SpotifyFinder.js:187–196  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

185
186 // get genres on page load
187 const loadGenres = async () => {
188 //get token
189 const token = await APICtrl.getToken()
190 //store the token onto the page
191 UICtrl.storeToken(token)
192 //get the genres
193 const genres = await APICtrl.getGenres(token)
194 //populate our genres select element
195 genres.forEach((element) => UICtrl.createGenre(element.name, element.id))
196 }
197
198 // create genre change event listener
199 DOMInputs.genre.addEventListener('change', async () => {

Callers 1

initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected