diff --git a/src/pages/home/HeaderView.tsx b/src/pages/home/HeaderView.tsx index 969e1a90ec3b..11f77b90cdfe 100644 --- a/src/pages/home/HeaderView.tsx +++ b/src/pages/home/HeaderView.tsx @@ -148,6 +148,7 @@ function HeaderView({report, parentReportAction, reportID, onNavigationMenuButto const shouldDisableDetailPage = ReportUtils.shouldDisableDetailPage(report); const shouldUseGroupTitle = isGroupChat && (!!report?.reportName || !isMultipleParticipant); const isLoading = !report?.reportID || !title; + const isParentReportLoading = !!report?.parentReportID && !parentReport; const isReportInRHP = route.name === SCREENS.SEARCH.REPORT_RHP; const shouldDisplaySearchRouter = !isReportInRHP || isSmallScreenWidth; @@ -291,7 +292,7 @@ function HeaderView({report, parentReportAction, reportID, onNavigationMenuButto {!shouldUseNarrowLayout && isChatUsedForOnboarding && freeTrialButton} {isTaskReport && !shouldUseNarrowLayout && ReportUtils.isOpenTaskReport(report, parentReportAction) && } - {canJoin && !shouldUseNarrowLayout && joinButton} + {!isParentReportLoading && canJoin && !shouldUseNarrowLayout && joinButton} {shouldDisplaySearchRouter && } @@ -312,7 +313,7 @@ function HeaderView({report, parentReportAction, reportID, onNavigationMenuButto )} - {!isLoading && canJoin && shouldUseNarrowLayout && {joinButton}} + {!isParentReportLoading && !isLoading && canJoin && shouldUseNarrowLayout && {joinButton}} {!isLoading && isChatUsedForOnboarding && shouldUseNarrowLayout && {freeTrialButton}} );