Skip to content

Commit

Permalink
frontend: add key to map's returned elements (#2822)
Browse files Browse the repository at this point in the history
  • Loading branch information
jecr committed Oct 23, 2023
1 parent 9744c7e commit 11a6f50
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frontend/packages/core/src/AppLayout/user.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,13 @@ const UserInformation: React.FC<UserInformationProps> = ({
<AvatarListItemText>{user}</AvatarListItemText>
</AvatarMenuItem>
{data?.map((d, i) => (
<>
// eslint-disable-next-line react/no-array-index-key
<React.Fragment key={i}>
<MenuItem>
<ListItemText>{d.value}</ListItemText>
</MenuItem>
{i > 0 && i < data.length && <Divider />}
</>
</React.Fragment>
))}
{_.castArray(children).length > 0 && <Divider />}
<div style={{ marginBottom: "8px" }}>
Expand Down

0 comments on commit 11a6f50

Please sign in to comment.