scorelab / Codelabz

Codelabz
Apache License 2.0
144 stars 410 forks source link

[ Feat : Clicking Open The List of "Following Users" at "/profile" ] #1182

Open rohitPandey469 opened 7 months ago

rohitPandey469 commented 7 months ago

Description

Changes over the PR #1181 ( for the workings of follow button ) - so do look that PR first. Added a new function getUserFollowings taking uid as params and returning an array followings of all the users whom the current user follows. Then loading that data in UserProfile component and sending it to ProfileCardOne, in this card a modal which is opening when the user followings count is clicked.

Related Issue

Fixes #1178

Motivation and Context

A Dynamic Web Platform.

How Has This Been Tested?

Tested locally on my machine.

Video:

https://github.com/scorelab/Codelabz/assets/123815256/d8807b6d-f2f0-4289-901a-4189186cb97d

In PR #1181, I was sending the same profileToFollowData in every UserElement component, but here sending differently that's why independent or more specifically the uids of all the four already present users, and the following count is changing and along with its list... the page re rendering is because of the profileData getting changed in the homepage, explained it more in above mentioned PR.

Types of changes

Checklist:

Additional:

Will make the PR for current user followers separately - cause I like clean and explainable code.