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

feat: Added mark components as favorites and unfavorites feature successfully issue 123 #125

Merged
merged 2 commits into from
Jun 6, 2024

Conversation

MeetDOD
Copy link
Contributor

@MeetDOD MeetDOD commented Jun 6, 2024

Pull Request Resolves [#123 ]

Title: Added mark components as favorites and unfavorites feature.

Description

  1. In backend: I created a new prisma schema for storing fav/unfav posts in database.
  2. Also created routes and controller for 3 operations, -Favorite -Unfavorite -FetchFavorite posts respectively.
  3. In Frontend fetch and posting operation is done, new file is created called Favorite where all fav posts are fetched.
  4. By clicking heart icon user can fav/unfav a post.

Related Issues

Fixes #123

Changes Made

New features: Adding mark components as favorites/unfavorities.

Screenshots

image

Video Demo

Style.Share.-.Google.Chrome.2024-06-06.15-06-08.1.online-video-cutter.mp4

I certify that I have carried out the relevant code of conduct and provided the requisite screenshot for validation by submitting this pull request.

Thank You for this contribution.

Copy link

vercel bot commented Jun 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
style-share ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 6, 2024 2:19pm

Copy link

github-actions bot commented Jun 6, 2024

Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. In the meantime, please ensure that your changes align with our CONTRIBUTING.md. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊

@MeetDOD
Copy link
Contributor Author

MeetDOD commented Jun 6, 2024

@VaibhavArora314 Tell me other features you like to see in future >_<

Copy link
Owner

@VaibhavArora314 VaibhavArora314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. in getFavoritePostsController, get userId from UserAuthRequest instead of params
  2. there is no need to send a me request separately in the Favorite.tsx, The userState is already present in store/atoms

…erState from atoms age instead of fetching /me api
@MeetDOD
Copy link
Contributor Author

MeetDOD commented Jun 6, 2024

@VaibhavArora314 Done the changes as requested !

@MeetDOD
Copy link
Contributor Author

MeetDOD commented Jun 6, 2024

also @VaibhavArora314 assign me issue #126 :)

Copy link
Owner

@VaibhavArora314 VaibhavArora314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove /:id from the route to get favorite posts

@VaibhavArora314
Copy link
Owner

also @VaibhavArora314 assign me issue #126 :)

I have asked the assigned person, if he is inactive or not working on it anymore then you can work on it

@MeetDOD
Copy link
Contributor Author

MeetDOD commented Jun 6, 2024

remove /:id from the route to get favorite posts

then how i will able to fetch their fav posts ?

@MeetDOD
Copy link
Contributor Author

MeetDOD commented Jun 6, 2024

@VaibhavArora314 sir, I checked and tested the whole feature and it's working fine ...

Copy link
Owner

@VaibhavArora314 VaibhavArora314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I will later separate the routes to avoid conflicts.

@VaibhavArora314 VaibhavArora314 merged commit 4df3f46 into VaibhavArora314:main Jun 6, 2024
3 checks passed
Copy link

github-actions bot commented Jun 6, 2024

🎉 Your pull request has been successfully merged! 🎉 Thank you for your valuable contribution to our project. Your efforts are greatly appreciated. Feel free to reach out if you have any more contributions or if there's anything else we can assist you with. Keep up the fantastic work! 🚀

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

Successfully merging this pull request may close these issues.

[Feature Request]: Adding mark components as favorites
2 participants