-
Notifications
You must be signed in to change notification settings - Fork 2
Migarate from Flowbite avatar into Shadcn avatar #135
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
base: migrate-button-component-slg-55
Are you sure you want to change the base?
Migarate from Flowbite avatar into Shadcn avatar #135
Conversation
| function getDisplayName(user?: SessionUser | null) { | ||
| if (user?.name && user.name.trim().length > 0) return user.name; | ||
| if (user?.email) { | ||
| const localPart = user.email.split('@')[0] ?? user.email; | ||
| return localPart || user.email; | ||
| } | ||
| return m.user_fallback(); | ||
| } | ||
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.
More code - more potential issue. Idea is to keep it simple and streightforward, limited to component and no functional changes. Kindly follow the previous implementation, if otherwise you have a very strong reason to add new "lines"
| alt={getDisplayName(page.data.session.user)} | ||
| /> | ||
| <AvatarFallback> | ||
| {getInitials(page.data.session.user?.name ?? page.data.session.user?.email ?? null)} |
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.
Please use the name only. We have bigger problems upstreams if we are not getting it tbh 👨🏻💻
aryadhruv
left a comment
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.
Great start ! A few changes.
Idea is to keep the changes and scope of PR limited to components migration. Thanks !
|
@shkelqim627 Let's merge this post #136 , ensuring that the button for dark mode and the avatar box has the same height. |
Replaced the Flowbite Avatar component with the new Shadcn Avatar component across the codebase.
Let me know if anything needs adjustment!