From 60828f119c5b8f5de1ba6f6a9d774ef0e813405b Mon Sep 17 00:00:00 2001 From: Maksim Pechnikov Date: Thu, 17 Oct 2019 16:19:52 +0300 Subject: updated FollowCard component --- src/components/follow_card/follow_card.js | 21 ++++-------------- src/components/follow_card/follow_card.vue | 35 +++++------------------------- 2 files changed, 9 insertions(+), 47 deletions(-) (limited to 'src/components/follow_card') diff --git a/src/components/follow_card/follow_card.js b/src/components/follow_card/follow_card.js index 118d0c7c..2c3231a9 100644 --- a/src/components/follow_card/follow_card.js +++ b/src/components/follow_card/follow_card.js @@ -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 - }) - } } } diff --git a/src/components/follow_card/follow_card.vue b/src/components/follow_card/follow_card.vue index a9d237bb..a43cac4e 100644 --- a/src/components/follow_card/follow_card.vue +++ b/src/components/follow_card/follow_card.vue @@ -16,36 +16,11 @@ -- cgit v1.2.3-70-g09d2 From b3f590ceb3e2710b278093a7246a3bf53c9aaafd Mon Sep 17 00:00:00 2001 From: Maksim Pechnikov Date: Thu, 17 Oct 2019 20:24:54 +0300 Subject: clear code --- src/components/follow_button/follow_button.vue | 2 +- src/components/follow_card/follow_card.js | 5 ----- src/components/follow_card/follow_card.vue | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) (limited to 'src/components/follow_card') diff --git a/src/components/follow_button/follow_button.vue b/src/components/follow_button/follow_button.vue index 66d899b9..f0cbb94b 100644 --- a/src/components/follow_button/follow_button.vue +++ b/src/components/follow_button/follow_button.vue @@ -1,7 +1,7 @@ -- cgit v1.2.3-70-g09d2