-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update Username Display Bug #179
base: dev
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for canine-assistants ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great emily!
src/pages/account.jsx
Outdated
setName(session.user.name); | ||
} | ||
}, [session]) | ||
fetch(`/api/users/${session?.user._id}`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check if session
and session.user
!= null/undefined before fetching. Another way to do it is check if status
!= "loading" and then add status
to the dependency array. status
comes from useSession()
hook
Update Username Display Bug
Issue Number(s): #174
What does this PR change and why?
on initial sign in, user's name will be updated accordingly in the settings page
Checklist
Critical Changes
Related PRs
PR Number(s):
How To Test