fix: Revert skeleton in Sidebar
- sidebar items repeating for some reason
This commit is contained in:
parent
66321e6af7
commit
7be9c381d8
@ -9,10 +9,7 @@
|
||||
<li class="hub-sidebar-item is-title bold text-muted">
|
||||
{{ __('Categories') }}
|
||||
</li>
|
||||
<li v-if="show_skeleton" class="hub-skeleton hub-sidebar-item" v-for="(c, $index) in [1, 2, 3, 4, 5, 6, 7]" :key="$index">
|
||||
Category
|
||||
</li>
|
||||
<li class="hub-sidebar-item" v-else v-for="category in categories" :key="category.label" v-route="category.route">
|
||||
<li class="hub-sidebar-item" v-for="category in categories" :key="category.label" v-route="category.route">
|
||||
{{ category.label }}
|
||||
</li>
|
||||
</ul>
|
||||
@ -59,15 +56,12 @@ export default {
|
||||
condition: () => this.hub_registered
|
||||
},
|
||||
],
|
||||
categories: [],
|
||||
show_skeleton: true
|
||||
categories: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.get_categories()
|
||||
.then(categories => {
|
||||
this.show_skeleton = false;
|
||||
|
||||
this.categories = categories.map(c => {
|
||||
return {
|
||||
label: __(c.name),
|
||||
|
Loading…
x
Reference in New Issue
Block a user