You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your bug related to a problem? Please describe.
There are two key issues related to user profile data handling:
Profile Store Overwriting Issue: The UserDetails.jsx component uses getUserProfileData, which updates the user state for every fetch. As a result, only a single user can be stored in the profile store at a time, leading to data being overwritten when switching between profiles.
Hardcoded User in Comments: In Comment.jsx and TutorialPage/index.jsx, the comment creation process currently uses a hardcoded user (codelabzuser) instead of dynamically using the authenticated user's handle.
Steps to Reproduce:
Navigate to someone's tutorial.
Comment something.
Observe every user getting changed to logged in user. Even the post's user gets changed.
Expected Behavior:
User profiles should be stored independently to allow different profiles.
The comment creation logic should use the actual authenticated user’s handle instead of a hardcoded value.
Describe the solution you'd like
Modify UserDetails.jsx to prevent overwriting the profile store or providing check statements to only update the current component if userId matches with the fetched one.
Update Comment.jsx and TutorialPage/index.jsx to use userHandle dynamically for comment creation instead of the fixed codelabzuser.
The text was updated successfully, but these errors were encountered:
Is your bug related to a problem? Please describe.
There are two key issues related to user profile data handling:
UserDetails.jsx
component usesgetUserProfileData
, which updates the user state for every fetch. As a result, only a single user can be stored in the profile store at a time, leading to data being overwritten when switching between profiles.Comment.jsx
andTutorialPage/index.jsx
, the comment creation process currently uses a hardcoded user (codelabzuser
) instead of dynamically using the authenticated user's handle.Steps to Reproduce:
Expected Behavior:
Describe the solution you'd like
UserDetails.jsx
to prevent overwriting the profile store or providing check statements to only update the current component if userId matches with the fetched one.Comment.jsx
andTutorialPage/index.jsx
to useuserHandle
dynamically for comment creation instead of the fixedcodelabzuser
.The text was updated successfully, but these errors were encountered: