mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-21 10:50:14 +01:00
👤 fix: Use user?.username if user?.name is undefined (#2511)
* Use `user?.username` if `user?.name` is undefined * Add useLocalize hook to Icon component
This commit is contained in:
parent
75da75be08
commit
667f5f91fe
3 changed files with 5 additions and 3 deletions
|
|
@ -42,7 +42,7 @@ export default function Message(props: TMessageProps) {
|
|||
|
||||
let messageLabel = '';
|
||||
if (isCreatedByUser) {
|
||||
messageLabel = UsernameDisplay ? user?.name : localize('com_user_message');
|
||||
messageLabel = UsernameDisplay ? user?.name || user?.username : localize('com_user_message');
|
||||
} else {
|
||||
messageLabel = message.sender;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue