This repository has been archived on 2021-07-29. You can view files and clone it, but cannot push or open issues or pull requests.
find_coach/src/pages/coaches/CoachesList.vue

31 lines
619 B
Vue

<template>
<section>
Filter
</section>
<section>
<div class="controls">
<button>Refresh</button>
<router-link to="/register">Register as Coach</router-link>
</div>
<ul v-if="hasCoaches">
<li v-for="coach in filteredCoaches" :key="coach.id">
{{ coach.firstName }}
</li>
</ul>
<h3 v-else>No coaches found.</h3>
</section>
</template>
<script>
export default {
computed: {
filteredCoaches() {
return this.$store.getters['coaches/coaches'];
},
hasCoaches() {
return this.$store.getters['coaches/hasCoaches'];
}
}
};
</script>