summaryrefslogtreecommitdiff
path: root/frontend/src/components/game/Board.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/components/game/Board.jsx')
-rw-r--r--frontend/src/components/game/Board.jsx11
1 files changed, 5 insertions, 6 deletions
diff --git a/frontend/src/components/game/Board.jsx b/frontend/src/components/game/Board.jsx
index 9c5db971..b29b847f 100644
--- a/frontend/src/components/game/Board.jsx
+++ b/frontend/src/components/game/Board.jsx
@@ -5,7 +5,7 @@ import { CardImage } from './CardImage';
// card offsets in % of their size when displayed in columns
const xOffset = 20;
-const yOffset = 23;
+const yOffset = 21;
type BoardProps = {
board: ApiBoard,
@@ -13,19 +13,18 @@ type BoardProps = {
export const Board = ({board}: BoardProps) => {
return <div className='board'>
- <TableCards cards={board.playedCards}/>
+ <TableCards cardColumns={board.playedCards}/>
<Wonder wonder={board.wonder}/>
</div>;
};
type TableCardsProps = {
- cards: ApiTableCard[],
+ cardColumns: ApiTableCard[][],
}
-const TableCards = ({cards}: TableCardsProps) => {
- // TODO split cards into multiple columns
+const TableCards = ({cardColumns}: TableCardsProps) => {
return <div className="cards">
- <TableCardColumn cards={cards}/>
+ {cardColumns.map(column => <TableCardColumn key={column[0].color} cards={column}/>)}
</div>
};
bgstack15