cinema/sorting.riot

24 lines
518 B
Plaintext
Raw Normal View History

2022-04-01 23:57:41 +02:00
<sorting>
<button onclick="{filteing}" value="&sort_by=vote_average.descvote_count.desc">Mieux notés</button>
<button onclick="{trading}">Plus populaires</button>
<script>
export default
{
async filteing(e)
{
let data = await this.sa.sorting(e.target.value)
this.props.updateListFilm(data.results)
console.log(data)
},
async trading()
{
let data = await this.sa.trading()
this.props.updateListFilm(data.results)
console.log(data)
}
}
</script>
</sorting>