modified code

This commit is contained in:
Matthis FAUVET 2024-06-21 17:52:44 +02:00
parent 67e2afc4fe
commit 8c9be799b3

View File

@ -33,7 +33,6 @@
items: data.results,
search: "albums"
};
//console.log(this.state.items);
this.paintButton();
this.album_style = "isActivate";
this.update();
@ -64,7 +63,9 @@
this.song_style = "isActivate";
this.state.search = "songs";
}
if(old_search != this.state.search){this.list();}
if(old_search != this.state.search){
this.list();
}
this.update();
},
async list(){
@ -72,7 +73,6 @@
this.state = {
items: data.results
};
this.update();
},
fetchData(){
return fetch("https://dwarves.iut-fbleau.fr/~fauvet/api/"+this.state.search).then(response => {