Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanDylann committed Jul 12, 2024
1 parent fd2c349 commit 631c965
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2475,6 +2475,7 @@ function getPolicyExpenseChatName(report: OnyxEntry<Report>, policy?: OnyxEntry<
const login = personalDetails ? personalDetails.login : null;
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
const reportOwnerDisplayName = getDisplayNameForParticipant(ownerAccountID) || login || report?.reportName;

// If the policy expense chat is owned by this user, use the name of the policy as the report name.
if (report?.isOwnPolicyExpenseChat) {
return getPolicyName(report, false, policy);
Expand Down
3 changes: 2 additions & 1 deletion src/pages/ReportDetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ function ReportDetailsPage({policies, report, session, personalDetails}: ReportD
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
const [parentReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID || '-1'}`);
const [reportNameValuePairs] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${report?.reportID ?? -1}`);
const [parentReportNameValuePairs] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${report?.parentReportID ?? -1}`);
const {reportActions} = usePaginatedReportActions(report.reportID || '-1');

const transactionThreadReportID = useMemo(
Expand Down Expand Up @@ -506,7 +507,7 @@ function ReportDetailsPage({policies, report, session, personalDetails}: ReportD
const shouldShowHoldAction =
caseID !== CASES.MONEY_REPORT &&
(canHoldUnholdReportAction.canHoldRequest || canHoldUnholdReportAction.canUnholdRequest) &&
!ReportUtils.isArchivedRoom(parentReport, ReportUtils.getReportNameValuePair(parentReport?.reportID));
!ReportUtils.isArchivedRoom(parentReport, parentReportNameValuePairs);

const canJoin = ReportUtils.canJoinChat(report, parentReportAction, policy);

Expand Down

0 comments on commit 631c965

Please sign in to comment.