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

Fix: Blog Post "Like 👍" functionality #139

Open
4 tasks
sonylomo opened this issue Mar 5, 2024 · 1 comment
Open
4 tasks

Fix: Blog Post "Like 👍" functionality #139

sonylomo opened this issue Mar 5, 2024 · 1 comment
Labels

Comments

@sonylomo
Copy link
Collaborator

sonylomo commented Mar 5, 2024

Description

As mentioned in #116, the blog's "Like 👍" functionality needs improvement.

Tasks

  • When the user clicks the Like button, they should get a pop-up modal prompting them to register/login first.
  • If the user chooses to login/register, then allow them to mutate the Like count only once.

Currently, the usePostLikeBlog function (hooks/Queries/blog/usePostLikeBlog) currently uses axios only to make a POST request. Here's what you should change:

  • The usePostLikeBlog function should be moved to hooks/Mutations/blog/usePostLikeBlog since it's a mutation and not a query
  • Instead of using axios, use a privateAxioswith@tanstack/react-query(reference:hooks/Mutations/shop/useMakeOrder`)
@zidanegimiga
Copy link

Hey. Would like to be assigned this.

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

No branches or pull requests

2 participants