aboutsummaryrefslogtreecommitdiff
path: root/src/components/follow_card/follow_card.js
blob: b26b27a74cad1696c0f6bddc7cd78c820b6a3e41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import BasicUserCard from '../basic_user_card/basic_user_card.vue'
import RemoteFollow from '../remote_follow/remote_follow.vue'
import FollowButton from '../follow_button/follow_button.vue'
import RemoveFollowerButton from '../remove_follower_button/remove_follower_button.vue'

const FollowCard = {
  props: [
    'user',
    'noFollowsYou'
  ],
  components: {
    BasicUserCard,
    RemoteFollow,
    FollowButton,
    RemoveFollowerButton
  },
  computed: {
    isMe () {
      return this.$store.state.users.currentUser.id === this.user.id
    },
    loggedIn () {
      return this.$store.state.users.currentUser
    },
    relationship () {
      return this.$store.getters.relationship(this.user.id)
    }
  }
}

export default FollowCard