@@ -244,11 +244,8 @@ function HeaderView({report, parentReportAction, onNavigationMenuButtonClicked,
244244 const shouldShowEarlyDiscountBanner = shouldShowDiscount && isChatUsedForOnboarding && ! isInSidePanel ;
245245 const latestScheduledCall = reportNameValuePairs ?. calendlyCalls ?. at ( - 1 ) ;
246246 const hasActiveScheduledCall = latestScheduledCall && ! isPast ( latestScheduledCall . eventTime ) && latestScheduledCall . status !== CONST . SCHEDULE_CALL_STATUS . CANCELLED ;
247- const shouldShowBackButton = shouldUseNarrowLayout || ! ! isInSidePanel ;
248-
249- const shouldShowCloseButton = isInSidePanel && ! shouldUseNarrowLayout && isConciergeChatReport ( report ) ;
250- const backButtonIcon = shouldShowCloseButton ? icons . Close : icons . BackArrow ;
251- const backButtonLabel = shouldShowCloseButton ? translate ( 'common.close' ) : translate ( 'common.back' ) ;
247+ const shouldShowCloseButton = ! ! isInSidePanel && ! shouldUseNarrowLayout && isConciergeChatReport ( report ) ;
248+ const shouldShowBackButton = ( shouldUseNarrowLayout || ! ! isInSidePanel ) && ! shouldShowCloseButton ;
252249
253250 const onboardingHelpDropdownButton = (
254251 < OnboardingHelpDropdownButton
@@ -284,17 +281,17 @@ function HeaderView({report, parentReportAction, onNavigationMenuButtonClicked,
284281 onPress = { onNavigationMenuButtonClicked }
285282 style = { [ styles . LHNToggle , shouldUseNarrowLayout && styles . pl5 ] }
286283 accessibilityHint = { translate ( 'accessibilityHints.navigateToChatsList' ) }
287- accessibilityLabel = { backButtonLabel }
284+ accessibilityLabel = { translate ( 'common.back' ) }
288285 role = { CONST . ROLE . BUTTON }
289286 sentryLabel = { CONST . SENTRY_LABEL . HEADER_VIEW . BACK_BUTTON }
290287 >
291288 < Tooltip
292- text = { backButtonLabel }
289+ text = { translate ( 'common.back' ) }
293290 shiftVertical = { 4 }
294291 >
295292 < View >
296293 < Icon
297- src = { backButtonIcon }
294+ src = { icons . BackArrow }
298295 fill = { theme . icon }
299296 />
300297 </ View >
@@ -389,6 +386,22 @@ function HeaderView({report, parentReportAction, onNavigationMenuButtonClicked,
389386 { ! shouldUseNarrowLayout && isOpenTaskReport ( report , parentReportAction ) && < TaskHeaderActionButton report = { report } /> }
390387 { ! isParentReportLoading && canJoin && ! shouldUseNarrowLayout && joinButton }
391388 </ View >
389+ { shouldShowCloseButton && (
390+ < Tooltip text = { translate ( 'common.close' ) } >
391+ < PressableWithoutFeedback
392+ onPress = { onNavigationMenuButtonClicked }
393+ style = { [ styles . touchableButtonImage ] }
394+ role = { CONST . ROLE . BUTTON }
395+ accessibilityLabel = { translate ( 'common.close' ) }
396+ sentryLabel = { CONST . SENTRY_LABEL . HEADER_VIEW . BACK_BUTTON }
397+ >
398+ < Icon
399+ src = { icons . Close }
400+ fill = { theme . icon }
401+ />
402+ </ PressableWithoutFeedback >
403+ </ Tooltip >
404+ ) }
392405 { ! isInSidePanel && < SidePanelButton style = { styles . ml2 } /> }
393406 { shouldDisplaySearchRouter && < SearchButton /> }
394407 </ View >
0 commit comments