* UI: #334 add config page language setting * temporary remove logout button * Unify fullscreen view class for dialog expanded and settings view - Replace dialog-expanded and settings-view with single fullscreen-view class - Update ResponsiveDialog to use fullscreen-view class - Update CalendarLayout to use fullscreen-view class for settings view - Consolidate CSS rules in Menubar.styl to use fullscreen-view - Update test cases to use new class name --------- Co-authored-by: Lê Nhân Phụng <lenhanphung@Phung-Mac-M4.local>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { userData } from "../features/User/userDataTypes";
|
||||
|
||||
/**
|
||||
* Get user display name for UI display
|
||||
* Returns full name if available, otherwise email, or empty string as fallback
|
||||
* @param user - User data object
|
||||
* @returns Display name string
|
||||
*/
|
||||
export function getUserDisplayName(user: userData | null | undefined): string {
|
||||
if (!user) {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (user.name && user.family_name) {
|
||||
return `${user.name} ${user.family_name}`;
|
||||
}
|
||||
|
||||
return user.email || "";
|
||||
}
|
||||
Reference in New Issue
Block a user