-
Notifications
You must be signed in to change notification settings - Fork 85
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
Added Follow Feature to User Profile (Backend & Frontend Integration) #438
Added Follow Feature to User Profile (Backend & Frontend Integration) #438
Conversation
✅ Deploy Preview for delightful-daifuku-a9f6ea ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@IkkiOcean, can you change the profile page's red background as we discussed before? |
I added a gradient to it. what should I change it to? |
@IkkiOcean can see the gradient because the deployment failed due to a syntax error: |
Please fix it |
@AlfiyaSiddique I think this looks good |
Yeah for now we can go with this, please make the changes |
@AlfiyaSiddique I completed the changes |
🎉 Thank you @IkkiOcean Your pull request has been successfully merged! 🎉 Thank you for your contribution to our project. Your efforts are greatly appreciated. Keep up the fantastic work! 🚀 |
Description:
I implemented a follow/unfollow feature on the user profile page. This will allow users to follow other users and see their followers/following counts. The feature includes both backend controller logic to manage user relationships and frontend integration to allow users to follow/unfollow others directly from their profile.
Changes made
Backend (Controller & API Logic):
toggleFollowUser
controller to handle follow/unfollow actions.userId
from the logged-in user and atargetUserId
from the request parameters.User
model if necessary to include the necessary fields (followers and following arrays).Frontend (Profile Integration):
Create a button on the user profile page for the follow/unfollow action.
Follow
if the logged-in user is not following the target user.Following
if the logged-in user is already following the target user.Call the backend API to toggle the follow/unfollow status when the button is clicked.
Display the updated follower and following counts dynamically.
Add loading states or error handling for the follow/unfollow action.
Closes FEATURE: Create User Profile Page and Follow Feature #424
video
rf.mp4