Fixes #14 only display follow button if user is logged in

This commit is contained in:
Jiayi Zheng 2017-01-22 17:42:07 +01:00
parent b98a6fe5bc
commit f1953dcb50
1 changed files with 4 additions and 1 deletions

View File

@ -6,7 +6,7 @@
<span class="glyphicon glyphicon-user"></span>
<div class='user-name'>{{user.name}}</div>
<div class='user-screen-name'>@{{user.screen_name}}</div>
<div v-if="isOtherUser" class="following-info">
<div v-if="isOtherUser && loggedIn" class="following-info">
<div v-if="user.follows_you" class="following">
Follows you!
</div>
@ -58,6 +58,9 @@
},
isOtherUser () {
return this.user !== this.$store.state.users.currentUser
},
loggedIn () {
return !!this.$store.state.users.currentUser
}
},
methods: {