Skip to content

Commit

Permalink
Filter out login when user is already logged in
Browse files Browse the repository at this point in the history
  • Loading branch information
Soleone committed Mar 20, 2021
1 parent cae6372 commit 88cea15
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,11 @@ export default {
return this.activeUserCount === 1 ? 'user' : 'users'
},
navigation() {
const links = this.links
if (!this.user) links.pop
return links
if (this.user) {
return this.links.filter(link => link.route !== '/login')
} else {
return this.links
}
}
},
created() {
Expand Down

0 comments on commit 88cea15

Please sign in to comment.