updated FollowCard component
This commit is contained in:
parent
d2079ecef4
commit
60828f119c
4 changed files with 12 additions and 50 deletions
|
@ -1,6 +1,6 @@
|
|||
import BasicUserCard from '../basic_user_card/basic_user_card.vue'
|
||||
import RemoteFollow from '../remote_follow/remote_follow.vue'
|
||||
import { requestFollow, requestUnfollow } from '../../services/follow_manipulate/follow_manipulate'
|
||||
import FollowButton from '../follow_button/follow_button.vue'
|
||||
|
||||
const FollowCard = {
|
||||
props: [
|
||||
|
@ -8,13 +8,12 @@ const FollowCard = {
|
|||
'noFollowsYou'
|
||||
],
|
||||
data () {
|
||||
return {
|
||||
inProgress: false
|
||||
}
|
||||
return { }
|
||||
},
|
||||
components: {
|
||||
BasicUserCard,
|
||||
RemoteFollow
|
||||
RemoteFollow,
|
||||
FollowButton
|
||||
},
|
||||
computed: {
|
||||
isMe () {
|
||||
|
@ -25,18 +24,6 @@ const FollowCard = {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
followUser () {
|
||||
this.inProgress = true
|
||||
requestFollow(this.user, this.$store).then(() => {
|
||||
this.inProgress = false
|
||||
})
|
||||
},
|
||||
unfollowUser () {
|
||||
this.inProgress = true
|
||||
requestUnfollow(this.user, this.$store).then(() => {
|
||||
this.inProgress = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue