@@ -17,11 +17,16 @@ import {
17
17
Name ,
18
18
TitleRole ,
19
19
Team ,
20
+ LocationSection ,
21
+ LocationSectionText ,
22
+ UserDetails
20
23
} from '../shared/SidebarStyledComponents' ;
21
24
import EntityGroups from '../shared/EntityGroups' ;
22
25
import { mapRoleIcon } from '../../identity/user/UserUtils' ;
23
26
import { useUserContext } from '../../context/useUserContext' ;
24
27
import { useBrowserTitle } from '../../shared/BrowserTabTitleContext' ;
28
+ import GlobeIcon from '../../../images/Globe.svg' ;
29
+ import { countries } from 'country-data-list' ;
25
30
26
31
const { Paragraph } = Typography ;
27
32
@@ -38,6 +43,7 @@ type SideBarData = {
38
43
groupsDetails : Array < EntityRelationship > ;
39
44
urn : string | undefined ;
40
45
dataHubRoles : Array < EntityRelationship > ;
46
+ countryCode : string | undefined ;
41
47
} ;
42
48
43
49
type Props = {
@@ -51,7 +57,7 @@ const AVATAR_STYLE = { marginTop: '14px' };
51
57
* UserInfoSideBar- Sidebar section for users profiles.
52
58
*/
53
59
export default function UserInfoSideBar ( { sideBarData, refetch } : Props ) {
54
- const { name, aboutText, avatarName, email, groupsDetails, phone, photoUrl, role, slack, team, dataHubRoles, urn } =
60
+ const { name, aboutText, avatarName, email, groupsDetails, phone, photoUrl, role, slack, team, dataHubRoles, urn, countryCode } =
55
61
sideBarData ;
56
62
57
63
const [ updateCorpUserPropertiesMutation ] = useUpdateCorpUserPropertiesMutation ( ) ;
@@ -120,6 +126,7 @@ export default function UserInfoSideBar({ sideBarData, refetch }: Props) {
120
126
< SideBarSubSection className = { isProfileOwner ? '' : 'fullView' } >
121
127
< CustomAvatar size = { 160 } photoUrl = { photoUrl } name = { avatarName } style = { AVATAR_STYLE } />
122
128
< Name > { name || < EmptyValue /> } </ Name >
129
+ < UserDetails > { urn ?. replace ( 'urn:li:corpuser:' , '' ) || < EmptyValue /> } </ UserDetails >
123
130
{ role && < TitleRole > { role } </ TitleRole > }
124
131
{ team && < Team > { team } </ Team > }
125
132
{ dataHubRoleName && < Tag icon = { mapRoleIcon ( dataHubRoleName ) } > { dataHubRoleName } </ Tag > }
@@ -143,6 +150,17 @@ export default function UserInfoSideBar({ sideBarData, refetch }: Props) {
143
150
</ Space >
144
151
</ SocialDetails >
145
152
< Divider className = "divider-aboutSection" />
153
+ { countryCode && (
154
+ < LocationSection >
155
+ Location
156
+ < br />
157
+ < LocationSectionText >
158
+ < img src = { GlobeIcon } alt = "Manage Users" style = { { display : 'inline' } } />
159
+ { countries [ countryCode ] . name }
160
+ </ LocationSectionText >
161
+ < Divider className = "divider-aboutSection" />
162
+ </ LocationSection >
163
+ ) }
146
164
< AboutSection >
147
165
About
148
166
< AboutSectionText >
0 commit comments