This repository was archived by the owner on Mar 6, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export interface UserAccountMenuProps {
1919 /** Called when the sign out button is clicked */
2020 onSignOutClickHandler : ( ) => void ;
2121 /** URL to the account management page */
22- manageAccountURL : string ;
22+ manageAccountURL ? : string ;
2323 /** The display name of the user. */
2424 displayName : string
2525 /** An URL for the user profile image. */
@@ -117,10 +117,10 @@ export class UserAccountMenu extends React.Component<UserAccountMenuProps, UserA
117117 </ div >
118118
119119 < div className = "account-section__buttons" >
120- < Button style = "secondary" type = "link" linkURL = { manageAccountURL } linkToNewTab >
120+ { manageAccountURL && < Button style = "secondary" type = "link" linkURL = { manageAccountURL } linkToNewTab >
121121 { I18n . translate ( "User account menu button" , "Manage account" ) }
122122 < LinkIcon />
123- </ Button >
123+ </ Button > }
124124
125125 < Button style = "secondary" onClickHandler = { ( ) => { this . _setShowMenu ( false ) ; onSignOutClickHandler ( ) } } >
126126 { I18n . translate ( "User account menu button" , "Sign out" ) }
Original file line number Diff line number Diff line change @@ -62,11 +62,11 @@ stories.add('User account menu', withInfo(
6262) ( ( ) =>
6363 < UserAccountMenu
6464 onSignOutClickHandler = { action ( 'clicked' ) }
65- manageAccountURL = " https://account-staging .ultimaker.com"
65+ manageAccountURL = { text ( 'Account Management URL' , ' https://account.ultimaker.com' ) }
6666 displayName = "Test User"
6767 triggerWidth = { text ( 'Trigger width' , null ) }
6868 triggerHeight = { text ( 'Trigger height' , null ) }
6969 signedOut = { boolean ( 'Sign out' , false ) }
7070 onSignInClickHandler = { action ( 'clicked' ) }
71- > </ UserAccountMenu >
71+ / >
7272) ) ;
You can’t perform that action at this time.
0 commit comments