modified code

This commit is contained in:
Matthis FAUVET 2024-06-21 16:38:05 +02:00
parent de98fe1cdc
commit c41302ccde

View File

@ -70,12 +70,11 @@
}, },
async list(){ async list(){
let data = await this.fetchData(); let data = await this.fetchData();
console.log(data.results); this.state = {
/*this.state = {
placeholder: "Rechercher dans les songs", placeholder: "Rechercher dans les songs",
items: await this.fetchData() items: data.results
}; };
this.update();*/ this.update();
}, },
fetchData(){ fetchData(){
return fetch("https://dwarves.iut-fbleau.fr/~fauvet/api/songs").then(response => { return fetch("https://dwarves.iut-fbleau.fr/~fauvet/api/songs").then(response => {