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 Oct 30, 2024
1 parent 112521f commit 492735d
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 @@ -553,10 +553,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 492735d

Please sign in to comment.