diff --git a/src/pages/home/report/ReportActionsList.tsx b/src/pages/home/report/ReportActionsList.tsx index f8b58cffd225..57d3c48e3b61 100644 --- a/src/pages/home/report/ReportActionsList.tsx +++ b/src/pages/home/report/ReportActionsList.tsx @@ -182,6 +182,8 @@ function ReportActionsList({ const hasFooterRendered = useRef(false); const linkedReportActionID = route?.params?.reportActionID ?? '-1'; + const canUserPerformWriteAction = ReportUtils.canUserPerformWriteAction(report); + const sortedVisibleReportActions = useMemo( () => sortedReportActions.filter( @@ -190,9 +192,9 @@ function ReportActionsList({ ReportActionsUtils.isDeletedParentAction(reportAction) || reportAction.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE || reportAction.errors) && - ReportActionsUtils.shouldReportActionBeVisible(reportAction, reportAction.reportActionID, ReportUtils.canUserPerformWriteAction(report)), + ReportActionsUtils.shouldReportActionBeVisible(reportAction, reportAction.reportActionID, canUserPerformWriteAction), ), - [sortedReportActions, isOffline, report], + [sortedReportActions, isOffline, canUserPerformWriteAction], ); const lastAction = sortedVisibleReportActions.at(0); const sortedVisibleReportActionsObjects: OnyxTypes.ReportActions = useMemo(