Skip to content

Commit 28f4da7

Browse files
authored
fix(components): fix react warning about missing key prop COMPASS-7788 (#5614)
* fix react warning about missing key prop * use Fragment rather
1 parent e916a6e commit 28f4da7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

packages/compass-components/src/components/breadcrumb.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import React, { Fragment } from 'react';
22
import { spacing } from '@leafygreen-ui/tokens';
33
import { css, cx } from '@leafygreen-ui/emotion';
44
import { palette } from '@leafygreen-ui/palette';
@@ -77,9 +77,8 @@ export const Breadcrumbs = ({
7777
);
7878
}
7979
return (
80-
<>
80+
<Fragment key={item.name}>
8181
<Link
82-
key={item.name}
8382
as="button"
8483
hideExternalIcon={true}
8584
className={cx(breadcrumbButtonStyles, textStyles)}
@@ -101,7 +100,7 @@ export const Breadcrumbs = ({
101100
color={palette.gray.light1}
102101
className={iconStyles}
103102
/>
104-
</>
103+
</Fragment>
105104
);
106105
})}
107106
</div>

0 commit comments

Comments
 (0)