to do: reserve card action, include gold chip or not

This commit is contained in:
Mikayla Dobson
2022-07-30 08:43:51 -05:00
parent 3e8d3b5e03
commit 70f2bbe16f
6 changed files with 26 additions and 10 deletions

View File

@@ -2,7 +2,6 @@ import { PlayerProps } from "../../util/propTypes";
import { CardData, PlayerData } from "../../util/types"
import { useEffect, useState } from "react";
import { v4 } from "uuid";
import { MiniCard } from "../Card/MiniCard";
export default function Player({ player, state, setState, setActionState }: PlayerProps) {
const [dynamic, setDynamic] = useState<PlayerData>();
@@ -65,6 +64,18 @@ export default function Player({ player, state, setState, setActionState }: Play
)})
}
</div>
<div className="reserved-cards">
<p>Reserved cards:</p>
{ dynamic?.reservedCards && dynamic.reservedCards?.map((data: CardData) => {
return (
<div key={v4()} className="mini-card" style={{backgroundColor: 'white'}}>
<p>{data.gemValue} cards</p>
<p>{data.points + " points" || null}</p>
</div>
)
})}
</div>
</section>
</div>
)