diff --git a/lib/components/app/app-menu-item.tsx b/lib/components/app/app-menu-item.tsx index f3a8e533b..3a9baebc7 100644 --- a/lib/components/app/app-menu-item.tsx +++ b/lib/components/app/app-menu-item.tsx @@ -68,7 +68,9 @@ export default class AppMenuItem extends Component { render(): JSX.Element { const { icon, id, onClick, subItems, text, ...otherProps } = this.props const { isExpanded } = this.state - const Element = otherProps.href ? 'a' : 'button' + const hasHref = !!otherProps.href + const isAbsolute = otherProps.href?.startsWith('http') + const Element = hasHref ? 'a' : 'button' const containerId = `${id}-container` return ( <> @@ -80,6 +82,7 @@ export default class AppMenuItem extends Component { onClick={subItems ? this._toggleSubmenu : onClick} onKeyDown={this._handleKeyDown} {...otherProps} + target={hasHref && isAbsolute ? '_blank' : undefined} > {icon} {text} diff --git a/lib/components/user/user-account-screen.js b/lib/components/user/user-account-screen.js index ab20fcf01..b99cbf794 100644 --- a/lib/components/user/user-account-screen.js +++ b/lib/components/user/user-account-screen.js @@ -54,7 +54,7 @@ class UserAccountScreen extends Component { ) { passedUserData.notificationChannel = notificationChannel.join(',') } - const result = await createOrUpdateUser(userData, intl) + const result = await createOrUpdateUser(passedUserData, intl) // If needed, display a toast notification on success. if (result === userActions.UserActionResult.SUCCESS && !silentOnSucceed) {