diff --git a/packages/client/src/views/SysAdmin/Team/user/UserList.tsx b/packages/client/src/views/SysAdmin/Team/user/UserList.tsx index 42e43a1dc7..c61076155a 100644 --- a/packages/client/src/views/SysAdmin/Team/user/UserList.tsx +++ b/packages/client/src/views/SysAdmin/Team/user/UserList.tsx @@ -34,7 +34,7 @@ import { NATL_ADMIN_ROLES, SYS_ADMIN_ROLES } from '@client/utils/constants' -import { createNamesMap } from '@client/utils/data-formatting' +import { createNamesMap, getLocalisedName } from '@client/utils/data-formatting' import { SysAdminContentWrapper } from '@client/views/SysAdmin/SysAdminContentWrapper' import { getAddressName, @@ -552,14 +552,7 @@ function UserListComponent(props: IProps) { return data.searchUsers.results.map( (user: User | null, index: number) => { if (user !== null) { - const name = - (user.name && - intl.formatMessage(constantsMessages.humanName, { - firstName: user.name[0].firstNames, - middleName: user.name[0].middleName, - lastName: user.name[0].familyName - })) || - '' + const name = getLocalisedName(intl, user.name[0]) const role = intl.formatMessage({ id: getUserRoleIntlKey(user.role._id) })