diff --git a/src/components/Card.tsx b/src/components/Card.tsx index f31f220..256ee6c 100644 --- a/src/components/Card.tsx +++ b/src/components/Card.tsx @@ -27,7 +27,9 @@ const CardComp: React.FC = ({card,side,onChange,onRemove}) => {
{card.items.map((item,i)=> -
+
{ItemToDisplay(item,side)} { onChange?.(new Card(card.title,card.armor,card.helmet,...card.items.filter((_,fi)=>i!==fi))) }} className="float-right cursor-pointer" >X diff --git a/src/components/CardGroup.tsx b/src/components/CardGroup.tsx index 347de2c..5c52c0f 100644 --- a/src/components/CardGroup.tsx +++ b/src/components/CardGroup.tsx @@ -21,7 +21,10 @@ const CardGroupComp: React.FC = ({cardGroup,side,onChange,onRemove}) => { />
{cardGroup.cards.map((card,index) => - { onChange?.(new CardGroup( cardGroup.numInDeck, diff --git a/src/components/Deck.tsx b/src/components/Deck.tsx index ce4ba89..6a39fdc 100644 --- a/src/components/Deck.tsx +++ b/src/components/Deck.tsx @@ -24,7 +24,10 @@ const DeckComp: React.FC = ({deck,side,title,onChange}) => { /> }
{deck.cardGroups.map((group,index) => - { onChange?.(new Deck( deck.numDefusers,