-
-
Notifications
You must be signed in to change notification settings - Fork 286
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 user image show on dashboard/* routes #918
Fix user image show on dashboard/* routes #918
Conversation
👷 Deploy request for v2-digitomize pending review.Visit the deploys page to approve it
|
👷 Deploy request for digitomize pending review.Visit the deploys page to approve it
|
WalkthroughThe Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- client/src/context/UserAuthContext.jsx (1 hunks)
Additional comments not posted (1)
client/src/context/UserAuthContext.jsx (1)
31-31
: Ensure the defaultphotoURL
is appropriate for all users.While the hardcoded URL ensures that all users have a profile image, consider if this generic image is suitable for all contexts. It might be better to allow users to set their own image or provide a more neutral placeholder.
I think we should handle this on the backend, we do have some default image being added on the backend for null images. This part should be fixed there itself |
In backend, Have you handled it for MongoDB or firebase also? |
You gotta check it, I think we've done it for mongodb only - can implement for firebase their itself |
@pranshugupta54 |
Actually doing it on frontend is gonna be fine too. Please make sure to check if it works for other cases too - than - emailPass. Maybe when google/github auth doesn't send a picture? |
Congratulations @saadman-galib, you just earned a holobyte! Here it is: https://holopin.io/holobyte/clwifvu1a19330cl48afdxgxq This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account. |
Pull Request Details
Description
The problem was with firebase createUserWithEmailandPassword. When a user was signing up using email and password. There wasn't setting any photourl. Thats why after login in /dashboard/* routes, for google auth users. it was showing the image because it is already set but for users signed up with email and password. It wasn't showing the user image as expected
Fixes
fixes #907
Type of PR
Summary
Screenshots (if applicable)
Additional Notes
[Include any additional information or context that might be helpful for reviewers.]
Checklist
npm run lint:fix
andnpm run format:fix
.Summary by CodeRabbit