File tree Expand file tree Collapse file tree 4 files changed +11
-1
lines changed
Expand file tree Collapse file tree 4 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ const HeaderBody = ({
2626 org,
2727 title,
2828 username,
29+ name,
2930 isAdmin,
3031 studioBaseUrl,
3132 logoutUrl,
@@ -131,6 +132,7 @@ const HeaderBody = ({
131132 < UserMenu
132133 { ...{
133134 username,
135+ name,
134136 studioBaseUrl,
135137 logoutUrl,
136138 authenticatedUserAvatar,
@@ -156,6 +158,7 @@ HeaderBody.propTypes = {
156158 logoAltText : PropTypes . string ,
157159 authenticatedUserAvatar : PropTypes . string ,
158160 username : PropTypes . string ,
161+ name : PropTypes . string ,
159162 isAdmin : PropTypes . bool ,
160163 isMobile : PropTypes . bool ,
161164 isHiddenMainMenu : PropTypes . bool ,
@@ -183,6 +186,7 @@ HeaderBody.defaultProps = {
183186 title : '' ,
184187 authenticatedUserAvatar : null ,
185188 username : null ,
189+ name : null ,
186190 isAdmin : false ,
187191 isMobile : false ,
188192 isHiddenMainMenu : false ,
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ MobileHeader.propTypes = {
4545 logoAltText : PropTypes . string ,
4646 authenticatedUserAvatar : PropTypes . string ,
4747 username : PropTypes . string ,
48+ name : PropTypes . string ,
4849 isAdmin : PropTypes . bool ,
4950 mainMenuDropdowns : PropTypes . arrayOf ( PropTypes . shape ( {
5051 id : PropTypes . string ,
@@ -65,6 +66,7 @@ MobileHeader.defaultProps = {
6566 title : null ,
6667 authenticatedUserAvatar : null ,
6768 username : null ,
69+ name : null ,
6870 isAdmin : false ,
6971 mainMenuDropdowns : [ ] ,
7072 outlineLink : null ,
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ const StudioHeader = ({
2828 title,
2929 containerProps,
3030 username : authenticatedUser ?. username ,
31+ name : authenticatedUser ?. name ,
3132 isAdmin : authenticatedUser ?. administrator ,
3233 authenticatedUserAvatar : authenticatedUser ?. avatar ,
3334 studioBaseUrl : isNewHomePage ? '/home' : config . STUDIO_BASE_URL ,
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import getUserMenuItems from './utils';
99
1010const UserMenu = ( {
1111 username,
12+ name,
1213 studioBaseUrl,
1314 logoutUrl,
1415 authenticatedUserAvatar,
@@ -32,7 +33,7 @@ const UserMenu = ({
3233 data-testid = "avatar-icon"
3334 />
3435 ) ;
35- const title = isMobile ? avatar : < > { avatar } { username } </ > ;
36+ const title = isMobile ? avatar : < > { avatar } { name || username } </ > ;
3637
3738 return (
3839 < NavDropdownMenu
@@ -50,6 +51,7 @@ const UserMenu = ({
5051
5152UserMenu . propTypes = {
5253 username : PropTypes . string ,
54+ name : PropTypes . string ,
5355 studioBaseUrl : PropTypes . string . isRequired ,
5456 logoutUrl : PropTypes . string . isRequired ,
5557 authenticatedUserAvatar : PropTypes . string ,
@@ -64,6 +66,7 @@ UserMenu.defaultProps = {
6466 isAdmin : false ,
6567 authenticatedUserAvatar : null ,
6668 username : null ,
69+ name : null ,
6770} ;
6871
6972export default injectIntl ( UserMenu ) ;
You can’t perform that action at this time.
0 commit comments