Commit f1953dcb authored by Jiayi Zheng's avatar Jiayi Zheng
Browse files

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

parent b98a6fe5
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<span class="glyphicon glyphicon-user"></span> <span class="glyphicon glyphicon-user"></span>
<div class='user-name'>{{user.name}}</div> <div class='user-name'>{{user.name}}</div>
<div class='user-screen-name'>@{{user.screen_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"> <div v-if="user.follows_you" class="following">
Follows you! Follows you!
</div> </div>
...@@ -58,6 +58,9 @@ ...@@ -58,6 +58,9 @@
}, },
isOtherUser () { isOtherUser () {
return this.user !== this.$store.state.users.currentUser return this.user !== this.$store.state.users.currentUser
},
loggedIn () {
return !!this.$store.state.users.currentUser
} }
}, },
methods: { methods: {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment