Skip to content

Commit dbcfcc2

Browse files
kyletsangjraff
authored andcommitted
fix(core-terms-and-conditions): use index as key when mapping
1 parent 58a1e3d commit dbcfcc2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

packages/TermsAndConditions/TermsAndConditions.jsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,9 @@ const TermsAndConditions = forwardRef(
121121
<FlexGrid.Row>
122122
<FlexGrid.Col xs={12} mdOffset={1} md={10}>
123123
<List size="small" below={4} type="indexed">
124-
{indexedContent.map(c => (
125-
<List.Item key={c}>{renderContent(c)}</List.Item>
124+
{indexedContent.map((c, idx) => (
125+
// eslint-disable-next-line react/no-array-index-key
126+
<List.Item key={idx}>{renderContent(c)}</List.Item>
126127
))}
127128
</List>
128129
</FlexGrid.Col>
@@ -142,8 +143,9 @@ const TermsAndConditions = forwardRef(
142143
</div>
143144
)}
144145
<List size="small" below={4} type="nonIndexed">
145-
{nonIndexedContent.map(c => (
146-
<List.Item key={c}>{renderContent(c)}</List.Item>
146+
{nonIndexedContent.map((c, idx) => (
147+
// eslint-disable-next-line react/no-array-index-key
148+
<List.Item key={idx}>{renderContent(c)}</List.Item>
147149
))}
148150
</List>
149151
</Box>

0 commit comments

Comments
 (0)