-
Notifications
You must be signed in to change notification settings - Fork 147
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
Fall back to email if name is empty #1606
base: main
Are you sure you want to change the base?
Conversation
The preview deployment is ready. 🟢 Open Preview | Open Build Logs Last updated at: 2025-01-10 03:39:17 CET |
The preview deployment is ready. 🟢 Open Preview | Open Build Logs Last updated at: 2025-01-10 03:39:13 CET |
The preview deployment is ready. 🟢 Open Preview | Open Build Logs Last updated at: 2025-01-10 03:39:18 CET |
The preview deployment is ready. 🟢 Open Preview | Open Build Logs Last updated at: 2025-01-10 03:39:14 CET |
@@ -28,7 +28,7 @@ | |||
const getMemberships = async (teamId: string) => { | |||
const memberships = await sdk.forConsole.teams.listMemberships(teamId); | |||
return memberships.memberships.map((team) => team.userName); | |||
return memberships.memberships.map((team) => team.userName || team.userEmail); |
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.
would also need to do the same in settings page here -
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.
good catch!
@@ -58,7 +58,7 @@ | |||
} else newOrgModal.set(true); | |||
} | |||
$: avatars = $members.memberships?.map((m) => m.userName) ?? []; | |||
$: avatars = $members.memberships?.map((m) => m.userName || m.userEmail) ?? []; |
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.
maybe we should also update it to team.userName
instead of just m
? this looks pretty inconsistent
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.
It's m for membership, not team
The fetch avatar API won't render properly if an empty string is provided for the name so we should fall back to the email if the name is empty.
bd22abf
to
f8712c3
Compare
What does this PR do?
The fetch avatar API won't render properly if an empty string is provided for the name so we should fall back to the email if the name is empty.
Fixes #1598
Test Plan
Manually tested before:
After:
Related PRs and Issues
Have you read the Contributing Guidelines on issues?
Yes