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 : Stored the commented_user Id and Used it to Show Avatar ] #1211

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rohitPandey469
Copy link

Description

  1. Created a new profile_action getCurrentUserData to fetch user data in TutorialPage component.
  2. Passed the userId to CommentBox component, and update the userId field in commentData to store real userId got from props and then the addComment action get called. Now, the comments have their userId and we can use it to fetch the userData.
  3. Then In Comment component the real userId passed into User component.
  4. Here called the getUserProfileData with the userId and fetched the value and used it to show Avatar.

Now, fetching it inside the component doesn't seem good but we are using the same component for every Avatar's so I am thinking of sending the user data directly into the component. Well, it's something I am just thinking

Related Issue

Fixes #1198

Motivation and Context

Fixing the Avatars so I can differentiate who wrote which/what/why comments.

How Has This Been Tested?

Locally On my machine.

Video:

Codelabz.-.Google.Chrome.2024-02-19.16-35-35.mp4

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the code style of this project.
  • All new and existing tests passed.

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

Successfully merging this pull request may close these issues.

[ Fix : Not Saving the USER_ID of the Commented User And No Proper Avatar For Comments ]
1 participant