cinema/filters.riot

22 lines
802 B
Plaintext
Raw Normal View History

2022-04-02 12:00:24 +02:00
<filters>
<div class="buttons">
<button onclick={setFilter} class="w3-button w3-blue w3-round" id="popular">Populaires</button>
<button onclick={setFilter} class="w3-button w3-blue w3-round" id="top_rated">Mieux notés</button>
<button onclick={setFilter} class="w3-button w3-blue w3-round" id="coming_soon">À venir</button>
<button onclick={setFilter} class="w3-button w3-blue w3-round" id="new">À l'affiche</button>
</div>
<script>
export default {
onBeforeMount (props,state) {
console.log(localStorage.getItem('currfilter'));
},
setFilter(e) {
localStorage.setItem('currfilter', e.target.id);
console.log("set")
this.update()
},
}
</script>
</filters>