Skip to content

Commit

Permalink
fix: Mark as cash button only appears in combined report
Browse files Browse the repository at this point in the history
  • Loading branch information
nkdengineer committed Aug 15, 2024
1 parent b7f7f1b commit aea2f92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/MoneyReportHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function MoneyReportHeader({policy, report: moneyRequestReport, transactionThrea
}
return reportActions.find((action): action is OnyxTypes.ReportAction<typeof CONST.REPORT.ACTIONS.TYPE.IOU> => action.reportActionID === transactionThreadReport.parentReportActionID);
}, [reportActions, transactionThreadReport?.parentReportActionID]);
const [transactions] = useOnyx(ONYXKEYS.COLLECTION.TRANSACTION);
const [transactions] = useMemo(() => useOnyx(ONYXKEYS.COLLECTION.TRANSACTION), []);

Check failure on line 73 in src/components/MoneyReportHeader.tsx

View workflow job for this annotation

GitHub Actions / Run ESLint

React Hook "useOnyx" cannot be called inside a callback. React Hooks must be called in a React function component or a custom React Hook function
const [dismissedHoldUseExplanation, dismissedHoldUseExplanationResult] = useOnyx(ONYXKEYS.NVP_DISMISSED_HOLD_USE_EXPLANATION, {initialValue: true});
const isLoadingHoldUseExplained = isLoadingOnyxValue(dismissedHoldUseExplanationResult);
const transaction =
Expand Down

0 comments on commit aea2f92

Please sign in to comment.