Skip to content

Commit aa38c85

Browse files
committed
remove useOnyx for chatReport
1 parent 97980d2 commit aa38c85

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/components/ReportActionItem/MoneyRequestView.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,7 @@ function MoneyRequestView({allReports, report, policy, shouldShowAnimatedBackgro
124124
const parentReportID = report?.parentReportID;
125125
const policyID = report?.policyID;
126126
const parentReport = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${parentReportID}`];
127-
const [chatReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${parentReport?.parentReportID}`, {
128-
selector: (chatReportValue) => chatReportValue && {reportID: chatReportValue.reportID, errorFields: chatReportValue.errorFields},
129-
canBeMissing: true,
130-
});
127+
const chatReport = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${parentReport?.parentReportID}`];
131128
const allPolicyCategories = usePolicyCategories();
132129
const policyCategories = allPolicyCategories?.[`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${policyID}`];
133130
const transactionReport = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${updatedTransaction?.reportID}`];

0 commit comments

Comments
 (0)