akkoma-fe/src/components/follow_card/follow_card.js

28 lines
733 B
JavaScript

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