Skip to content

Commit f20ecda

Browse files
Remove redundant indexOf in renderTopReportActions
Since renderItem now computes the real index via indexOf internally, the call site in renderTopReportActions no longer needs to compute it. Co-authored-by: Aimane Chnaif <aimane-chnaif@users.noreply.github.com>
1 parent 1ff0a7c commit f20ecda

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/pages/inbox/report/ReportActionsList.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -849,11 +849,11 @@ function ReportActionsList({
849849
<>
850850
{!shouldShowReportRecipientLocalTime && !hideComposer && <View style={[styles.stickToBottom, styles.appBG, styles.zIndex10, styles.height4]} />}
851851
<StaticReportActionsPreview>
852-
{previewItems.map((action) => (
852+
{previewItems.map((action, index) => (
853853
<View key={action.reportActionID}>
854854
{renderItem({
855855
item: action,
856-
index: sortedVisibleReportActions.indexOf(action),
856+
index,
857857
} as ListRenderItemInfo<OnyxTypes.ReportAction>)}
858858
</View>
859859
))}

0 commit comments

Comments
 (0)