diff --git a/src/components/Card/Card.tsx b/src/components/Card/Card.tsx index a5f38d7..a689856 100644 --- a/src/components/Card/Card.tsx +++ b/src/components/Card/Card.tsx @@ -11,7 +11,7 @@ export default function Card({ data, state, setState }: CardProps) { const currentPlayer = useCurrentPlayer(state); return ( -
Counts as: {data.gemValue}
Point value: {data.points || 0}
diff --git a/src/components/Card/CardRow.tsx b/src/components/Card/CardRow.tsx index 2b89a07..f998d0e 100644 --- a/src/components/Card/CardRow.tsx +++ b/src/components/Card/CardRow.tsx @@ -2,8 +2,11 @@ import { CardRowProps } from '../../util/propTypes'; import { CardData } from "../../util/types" import Card from "../Card/Card" import { v4 } from 'uuid'; +import cardTierToKey from '../../util/cardTierToKey'; export default function CardRow({tier, state, setState}: CardRowProps) { + const typedTier = cardTierToKey(tier); + let cards: ArrayTier: {tier}
Remaining: {state.gameboard.deck[typedTier].length}
+{data.gemValue} card
-{data.points || null}
-{data.gemValue} cards
{data.points + " points" || null}
+ { + Object.entries(data.resourceCost).map(([key, value]) => { + return value > 0 &&{key}: {value}
+ }) + }