Skip to content

Commit

Permalink
Use constants.humanName on the UserList.tsx comp
Browse files Browse the repository at this point in the history
To ensure that we get the format from the country-config

#6830
  • Loading branch information
Siyasanga committed Jan 15, 2025
1 parent 642979c commit 9108a8f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/client/src/views/SysAdmin/Team/user/UserList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -536,10 +536,12 @@ function UserListComponent(props: IProps) {
(user: User | null, index: number) => {
if (user !== null) {
const name =
(user &&
user.name &&
((createNamesMap(user.name)[intl.locale] as string) ||
(createNamesMap(user.name)[LANG_EN] as string))) ||
(user.name &&
intl.formatMessage(constantsMessages.humanName, {
firstName: user.name[0].firstNames,
middleName: user.name[0].middleName,
lastName: user.name[0].familyName
})) ||
''
const role = intl.formatMessage({
id: getUserRoleIntlKey(user.role._id)
Expand Down

0 comments on commit 9108a8f

Please sign in to comment.