Skip to content

Commit

Permalink
replaced array index usage by headerEmoji.index
Browse files Browse the repository at this point in the history
  • Loading branch information
HezekielT committed Apr 8, 2024
1 parent 4192624 commit 27a2dd5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/EmojiPicker/CategoryShortcutBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ function CategoryShortcutBar({onPress, headerEmojis}: CategoryShortcutBarProps)
const styles = useThemeStyles();
return (
<View style={[styles.ph4, styles.flexRow]}>
{headerEmojis.map((headerEmoji, i) => (
{headerEmojis.map((headerEmoji) => (
<CategoryShortcutButton
icon={headerEmoji.icon}
onPress={() => onPress(headerEmoji.index)}
// eslint-disable-next-line react/no-array-index-key
key={`categoryShortcut${i}`}
key={`categoryShortcut${headerEmoji.index}`}
code={headerEmoji.code}
/>
))}
Expand Down

0 comments on commit 27a2dd5

Please sign in to comment.