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,6 +2,7 @@ import { v4 } from 'uuid';
import { CardProps } from '../../util/propTypes';
import { ResourceCost } from '../../util/types';
import { buyCardActions } from '../Player/ActionMethods';
import { reserveCard } from '../Player/ActionMethods/reserveCardActions';
const { buyCard, tooExpensive } = buyCardActions;
export default function Card({ data, state, setState }: CardProps) {
@@ -25,6 +26,12 @@ export default function Card({ data, state, setState }: CardProps) {
Buy This Card
</button>
}
{ state.actions.reserveCard.active &&
<button
onClick={() => reserveCard(state)}>
Reserve This Card
</button>
}
</div>
</div>
)