Skip to content
Permalink
fdceacf750
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Latest commit fdceacf Apr 6, 2020 History
1 contributor

Users who have contributed to this file

46 lines (43 sloc) 919 Bytes
<template>
<div id="app">
<div id="nav">
<router-link to="/">Home</router-link> |
<router-link to="/about">About</router-link> |
<router-link to="/login" v-if="!authenticated">Log in</router-link>
<a href="#" v-if="authenticated" @click="$store.dispatch('signOut')">Log out</a>
</div>
<router-view/>
</div>
</template>
<script>
export default {
name: 'app',
computed: {
authenticated(){
return this.$store.getters.isAuthenticated;
}
},
mounted() {
// console.log(this.authenticated);
}
}
</script>
<style lang="scss">
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
}
#nav {
padding: 30px;
a {
font-weight: bold;
color: #2c3e50;
&.router-link-exact-active {
color: #42b983;
}
}
}
</style>