From d17413407139c048f1503642dd9e7135cd531f26 Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Wed, 4 Oct 2023 09:21:00 -0400 Subject: [PATCH 1/2] fix(AppMenuItem): Make app menu external links open in new browser tab. --- lib/components/app/app-menu-item.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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} From a13e20bcd678a507385eca7afc2fc696ed022466 Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Mon, 9 Oct 2023 16:01:09 -0400 Subject: [PATCH 2/2] fix(user-account-screen): Pass the correct object for persisting. --- lib/components/user/user-account-screen.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {