hide the Register button if the user is not a coach
This commit is contained in:
parent
aece4bba6a
commit
494fdd4b46
|
@ -6,7 +6,9 @@
|
|||
<section>
|
||||
<div class="controls">
|
||||
<base-button mode="outline">Refresh</base-button>
|
||||
<base-button link to="/register">Register as Coach</base-button>
|
||||
<base-button v-if="!isCoach" link to="/register"
|
||||
>Register as Coach</base-button
|
||||
>
|
||||
</div>
|
||||
<ul v-if="hasCoaches">
|
||||
<coach-item
|
||||
|
@ -40,6 +42,9 @@ export default {
|
|||
};
|
||||
},
|
||||
computed: {
|
||||
isCoach() {
|
||||
return this.$store.getters['coaches/isCoach'];
|
||||
},
|
||||
filteredCoaches() {
|
||||
const coaches = this.$store.getters['coaches/coaches'];
|
||||
return coaches.filter(coach => {
|
||||
|
|
Reference in New Issue