diff --git a/src/views/Lists.vue b/src/views/Lists.vue index 38cd6f3e..b75e5f96 100644 --- a/src/views/Lists.vue +++ b/src/views/Lists.vue @@ -1,22 +1,32 @@ @@ -30,14 +40,25 @@ export default { components: { ListCard, }, + data: () => ({ + isLoading: true, + }), methods: { ...mapActions(['fetchLists']), }, computed: { ...mapState(['lists']), + showNoListsInfo() { + return !this.isLoading && this.lists.length < 1; + }, + loaderNumber() { + return this.isLoading ? 3 : 0; + }, }, mounted() { - this.fetchLists(); + this.fetchLists().then(() => { + this.isLoading = false; + }); }, }; @@ -62,6 +83,6 @@ ul { .fade-enter, .fade-leave-active { - opacity: 0 + opacity: 0; }