Skip to content
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

Bug: fixed broken image in user logo #229

Closed
wants to merge 291 commits into from

Conversation

Febin-Joseph
Copy link

Hi ,
i have found a Bug after user login using vercel account, the Bug is :

  • If the user doesn't have a Profile image and a name in vercel account then it will show a broken image in Header in the part of the users logo like this:
    Before Image :

no-image

Fixed image :
Now if the user doesn't have a profile image and name in vercel the default icon will be displayed else if having a profile image and doesn't have a name then only the profile image will be dispalyed as before.

icon

Copy link

vercel bot commented Jan 27, 2024

@Febin-Joseph is attempting to deploy a commit to the Uncurated Tests Team on Vercel.

A member of the Team first needs to authorize it.

@shadcn
Copy link
Collaborator

shadcn commented Feb 15, 2024

I wonder if we can instead use the avatar component with <AvatarFallback /> instead?

<Avatar>
  <AvatarImage src="https://github.com/shadcn.png" />
  <AvatarFallback>CN</AvatarFallback>
</Avatar>

@Febin-Joseph
Copy link
Author

@shadcn But in the place of CN text in here <AvatarFallback>CN</AvatarFallback> what can be given.

@shadcn
Copy link
Collaborator

shadcn commented Feb 20, 2024

@Febin-Joseph We can use the user initials. See

function getUserInitials(name: string) {

@Febin-Joseph
Copy link
Author

@shadcn The case is if the user doesn't have a profile pic and also doesn't have a user name in their vercel account then only the broken image will be displayed and think if the user have a username in vercel account but doesn't have a profile pic, in that scenario instead of the broken image the user's names two letters will be displayed in the place of profile.

But in this case the user doesn't have a name too. then how can use getUserInitials()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet