This commit is contained in:
lalBi94 2023-03-06 05:25:05 +01:00
parent 01738fcfa8
commit de2a768813

View File

@ -125,6 +125,7 @@
* */
previousPage(){
try {
console.log(this.state.page.cat.option1)
if(this.state.page.curIndex-1 >= 0) {
this.update({ curIndex: this.state.page.curIndex-- });
}
@ -141,15 +142,14 @@
nextPage(choice) {
try {
if(this.state.page.curIndex+1 <= 2 ) {
if(this.state.page.curIndex+1 === 0) {
this.getData()
this.update({ option1: choice })
if(this.state.page.curIndex === 0) {
this.update({ option1: "fsef", option2: "fefs", option3: "fe" })
console.log(this.state.page.cat)
} else if(this.state.page.curIndex+1 === 1) {
this.update({ option2: choice })
} else if(this.state.page.curIndex+1 === 2) {
this.update({option3: choice})
}
this.update({ curIndex: this.state.page.curIndex++ });
}
} catch(e) {
@ -166,7 +166,6 @@
const response = await fetch(api);
const data = await response.json();
this.update({ data: data.facet_groups[0].facets });
console.log(data)
} catch (e) {
console.error(e);
}
@ -178,7 +177,10 @@
};
</script>
<span if={ !this.state.data }>Chargement des données...</span>
<span if={ !this.state.data }>
Chargement des données... <br />
<loader />
</span>
<div if={ this.state.data } id="selector">
<div id="selector-top-container">