fix Warning: Each child in a list should have a unique "key" prop

This commit is contained in:
Chika 2022-06-21 18:09:19 +03:00
parent e25821ce5e
commit 858542993f
2 changed files with 5 additions and 5 deletions

View File

@ -95,7 +95,7 @@ const overrideRenderElements: Partial<Record<keyof typeof map, RenderProps>> = {
});
return (
<Container>
<Container key="selectLead">
<Head title={title} addon={<LinkComponent {...defaultLinkProps} />} />
<Element {...props} />
</Container>
@ -122,7 +122,7 @@ const overrideRenderElements: Partial<Record<keyof typeof map, RenderProps>> = {
});
return (
<Container>
<Container key="selectOpportunity">
<Head title={title} addon={<LinkComponent {...defaultLinkProps} />} />
<Element {...props} />
</Container>
@ -149,7 +149,7 @@ const overrideRenderElements: Partial<Record<keyof typeof map, RenderProps>> = {
});
return (
<Container>
<Container key="selectQuote">
<Head title={title} addon={<LinkComponent {...defaultLinkProps} />} />
<Element {...props} />
</Container>

View File

@ -1,3 +1,4 @@
/* eslint-disable react/no-array-index-key */
import Divider from 'Elements/layout/Divider';
import type { BoxProps } from 'UIKit/grid';
import { Box } from 'UIKit/grid';
@ -26,7 +27,6 @@ function renderFormRows(rowsConfig: FormTabRows) {
return (
<Box
// eslint-disable-next-line react/no-array-index-key
key={i.toString()}
sx={{
display: 'grid',
@ -42,7 +42,7 @@ function renderFormRows(rowsConfig: FormTabRows) {
const { title } = row;
return <Divider>{title}</Divider>;
return <Divider key={i.toString()}>{title}</Divider>;
});
return (