Open
Description
Issue Overview
The uid is never sent from the useEffect in the ArticlePage since it loads before having the user being set.
Describe your environment
I have the same code as the one provided in branch 06_01b, with same setup as shown in the videos.
Steps to Reproduce
- Log in with a new user
- Open a page article
- The button to upvote will say that you already upvoted
Expected Behavior
The button should say Upvote. More technically the user data should be passed to the backend when loading the page.
Current Behavior
The button always says that you already upvoted, and the headers sent to the backend are always null. This is due to the logic of loading only when the isLoading
variable is true, which means that the user variable hasn't been set.
Possible Solution
Not sure what is the proper solution but maybe loading the page once the user has been set.
Screenshots / Video
Related Issues
Metadata
Metadata
Assignees
Labels
No labels