Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArticleActions:Follow feature does not work properly on article pages #277

Open
afterup opened this issue Nov 25, 2019 · 1 comment
Open

Comments

@afterup
Copy link

afterup commented Nov 25, 2019

ArticleActions.vue.

computed:
스크린샷 2019-11-25 오전 10 58 49
methods:
스크린샷 2019-11-25 오전 10 59 10

  • When the toggle button is clicked twice, the method works but the text of the toggle button does not change.
  • Following on the article page indicates that all users of other posts are followed.

When loading the article page for the first time, only User, Comments, and Article are set, but the change is the profile, so it does not bring follow results when loading.

This could be solved by loading setProfile, but I hope there's a better way to make it load longer.

@yxj0312
Copy link

yxj0312 commented Sep 9, 2020

Thought the Profile should be loaded like in the profile.vue

mounted() {
    this.$store.dispatch(FETCH_PROFILE, {
      username: this.article.author.username
    });
  },

and const action should instead action be profile.following

const action = this.profile.following
        ? FETCH_PROFILE_UNFOLLOW
        : FETCH_PROFILE_FOLLOW;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants