Only show the list with teams if there are any teams

This commit is contained in:
kolaente 2021-01-08 23:07:17 +01:00
parent aa427c7a7d
commit 36f5f0eabc
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -1,19 +1,21 @@
<template>
<div class="content loader-container is-max-width-desktop" v-bind:class="{ 'is-loading': teamService.loading}">
<router-link :to="{name:'teams.create'}" class="button is-success button-right">
<router-link :to="{name:'teams.create'}" class="button is-primary button-right">
<span class="icon is-small">
<icon icon="plus"/>
</span>
New Team
</router-link>
<h1>Teams</h1>
<ul class="teams box">
<ul class="teams box" v-if="teams.length > 0">
<li :key="t.id" v-for="t in teams">
<router-link :to="{name: 'teams.edit', params: {id: t.id}}">
{{ t.name }}
</router-link>
</li>
</ul>
<p v-else class="has-text-centered has-text-grey">You are currently not part of any teams.</p>
</div>
</template>