add a Login button to the header

This commit is contained in:
Andreas Zweili 2021-07-29 17:03:25 +02:00
parent 4754507838
commit fc6df0a6b1
1 changed files with 14 additions and 1 deletions

View File

@ -6,14 +6,27 @@
<li> <li>
<router-link to="/coaches">All Coaches</router-link> <router-link to="/coaches">All Coaches</router-link>
</li> </li>
<li> <li v-if="isLoggedIn">
<router-link to="/requests">Requests</router-link> <router-link to="/requests">Requests</router-link>
</li> </li>
<li v-else>
<router-link to="/auth">Login</router-link>
</li>
</ul> </ul>
</nav> </nav>
</header> </header>
</template> </template>
<script>
export default {
computed: {
isLogggedIn() {
return this.$store.getters.isAuthenticated;
}
}
};
</script>
<style scoped> <style scoped>
header { header {
width: 100%; width: 100%;