Skip to content

Commit

Permalink
Add key for each MenuItem in SortSelector
Browse files Browse the repository at this point in the history
  • Loading branch information
KavetiRohith committed Sep 12, 2023
1 parent c1354f3 commit 527a71e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/SortSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ const SortSelector = ({ sortOrder, onSelectSortOrder }: SortSelectorProps) => {
</MenuButton>
<MenuList>
{sortOrders.map((sortOrder) => (
<MenuItem onClick={() => onSelectSortOrder(sortOrder.value)}>
<MenuItem
key={sortOrder.label}
onClick={() => onSelectSortOrder(sortOrder.value)}
>
{sortOrder.label}
</MenuItem>
))}
Expand Down

0 comments on commit 527a71e

Please sign in to comment.