scorelab / Codelabz

Codelabz
Apache License 2.0
142 stars 406 forks source link

[ Feat : Rendering Current User Tutorials on Profile Page ] #1144

Open rohitPandey469 opened 9 months ago

rohitPandey469 commented 9 months ago

Description

Previously, the "/profile" page was rendering "userList" seeded ( or fixed ) data, and here I modified it to display all tutorials created by a specific user. To achieve this, I introduced a new field in tutorials called 'uid,' which holds the UID of the user added to the tutorial during creation (in 'NewTutorial'). On the "/profile" page, I now extract all tutorials data and filter it based on the current user's UID.

Related Issue

Fixes #1085

Motivation and Context

The change addresses issue #1085, where the "/profile" page was rendering userList data ( fixed ). Now, it showcases all tutorials of a specific user, providing a more relevant and personalized experience. Additionally, I propose further enhancements, such as displaying recent activity, including tutorials made by the user, top comments, and likes on different posts—like LinkedIn.

How Has This Been Tested?

I tested the changes on my local machine to ensure the correct rendering of tutorials on the "/profile" page.

Video demonstrating the change :

https://github.com/scorelab/Codelabz/assets/123815256/8a31ab7c-e1ea-40e0-87b0-057d5e77bbf0

As demonstrated in the video, I modified the 'uid' field of "Different UID tutorial" in Firebase, and the changes are reflected in the "/profile" activity section i.e. only uid with same ids is shown and different id which is in case 'Different UID tutorial' is not shown.

Types of changes

Checklist: