Skip to content

Commit

Permalink
Merge pull request #53147 from daledah/fix/52589
Browse files Browse the repository at this point in the history
fix: Join button appear when open expense on search
  • Loading branch information
puneetlath authored Dec 12, 2024
2 parents f07e24e + 0c3a705 commit 9cdd9d7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pages/home/HeaderView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -288,7 +289,7 @@ function HeaderView({report, parentReportAction, reportID, onNavigationMenuButto
<View style={[styles.reportOptions, styles.flexRow, styles.alignItemsCenter]}>
{!shouldUseNarrowLayout && isChatUsedForOnboarding && freeTrialButton}
{isTaskReport && !shouldUseNarrowLayout && ReportUtils.isOpenTaskReport(report, parentReportAction) && <TaskHeaderActionButton report={report} />}
{canJoin && !shouldUseNarrowLayout && joinButton}
{!isParentReportLoading && canJoin && !shouldUseNarrowLayout && joinButton}
</View>
{shouldDisplaySearchRouter && <SearchButton style={styles.ml2} />}
</View>
Expand All @@ -309,7 +310,7 @@ function HeaderView({report, parentReportAction, reportID, onNavigationMenuButto
</View>
)}
</View>
{!isLoading && canJoin && shouldUseNarrowLayout && <View style={[styles.ph5, styles.pb2]}>{joinButton}</View>}
{!isParentReportLoading && !isLoading && canJoin && shouldUseNarrowLayout && <View style={[styles.ph5, styles.pb2]}>{joinButton}</View>}
{!isLoading && isChatUsedForOnboarding && shouldUseNarrowLayout && <View style={[styles.pb3, styles.ph5]}>{freeTrialButton}</View>}
</View>
);
Expand Down

0 comments on commit 9cdd9d7

Please sign in to comment.