mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Update backend/src/util/utilities.ts
Co-authored-by: Hannes Heine <heine.hannes@gmail.com>
This commit is contained in:
parent
153fec8479
commit
03246bb54a
@ -19,17 +19,3 @@ export const fullName = (firstName: string, lastName: string): string => {
|
||||
return [firstName, lastName].filter(Boolean).join(' ')
|
||||
}
|
||||
|
||||
export const userName = (firstName?: string, lastName?: string): string | null => {
|
||||
let name: string | null
|
||||
if (firstName && lastName) {
|
||||
name = firstName + ' ' + lastName
|
||||
} else if (firstName && !lastName) {
|
||||
name = firstName
|
||||
} else if (!firstName && lastName) {
|
||||
name = lastName
|
||||
} else {
|
||||
name = null
|
||||
}
|
||||
|
||||
return name
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user