Skip to content

Commit

Permalink
Add key to ul, start tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Moore committed Dec 4, 2024
1 parent a7a0a80 commit ba8b4dc
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions packages/components/src/Tile/TileGrid/TileGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@ export const TileGrid = ({

const tiles = Children.map(children, child => {
if (Array.isArray(child.props.children)) {
return child.props.children!.map((tile: TileElement, index) => (
<li
className={classnames(styles.li, classNameOverride)}
key={`${tileGridBaseId}-${index}`}
>
{tile}
</li>
))
return child.props.children!.map(
(tile: TileElement, index) => (
<li
className={classnames(styles.li, classNameOverride)}
key={`${tileGridBaseId}-${index}`}
>
{tile}
</li>
)
)
} else {
return (
<li className={classnames(styles.li, classNameOverride)}>{child}</li>
Expand Down

0 comments on commit ba8b4dc

Please sign in to comment.