added key to card loop
This commit is contained in:
parent
c08e23d659
commit
0303bd3954
@ -21,7 +21,7 @@ const CardGroupComp: React.FC<Props> = ({cardGroup,side,onChange,onRemove}) => {
|
|||||||
/>
|
/>
|
||||||
<div className="flex">
|
<div className="flex">
|
||||||
{cardGroup.cards.map((card,index) =>
|
{cardGroup.cards.map((card,index) =>
|
||||||
<CardComp card={card} side={side}
|
<CardComp key={index} card={card} side={side}
|
||||||
onChange={(newCard)=>{
|
onChange={(newCard)=>{
|
||||||
onChange?.(new CardGroup(
|
onChange?.(new CardGroup(
|
||||||
cardGroup.numInDeck,
|
cardGroup.numInDeck,
|
||||||
|
Loading…
Reference in New Issue
Block a user