[pl][names] no asyncData

This commit is contained in:
Andrea Vos 2022-08-04 17:59:55 +02:00
parent b856ed3ba4
commit 10f6bf868f

View File

@ -37,6 +37,7 @@
</section> </section>
<section> <section>
<Loading :value="namesRaw">
<ul class="list-group small"> <ul class="list-group small">
<template v-if="visibleNames().length"> <template v-if="visibleNames().length">
<li v-for="name in visibleNames()" :class="['list-group-item', name.approved ? '' : 'marked']"> <li v-for="name in visibleNames()" :class="['list-group-item', name.approved ? '' : 'marked']">
@ -100,6 +101,7 @@
</li> </li>
</template> </template>
</ul> </ul>
</Loading>
</section> </section>
<Separator icon="plus"/> <Separator icon="plus"/>
@ -119,15 +121,12 @@
mixins: [ hash ], mixins: [ hash ],
data() { data() {
return { return {
namesRaw: undefined,
filter: '', filter: '',
} }
}, },
async asyncData({app}) { async mounted() {
return { this.namesRaw = await this.$axios.$get(`/names`);
namesRaw: await app.$axios.$get(`/names`),
}
},
mounted() {
this.handleHash('', filter => { this.handleHash('', filter => {
this.filter = filter; this.filter = filter;
if (filter) { if (filter) {