corda-checkers/webapp/src/container/games/action/Reject.jsx
djmil 9c8e296684 GameProposal: Cancel
show button only if cancelable game is selected
2023-11-15 09:15:38 +01:00

15 lines
441 B
JavaScript

import React, { useContext } from 'react';
import { GamesContext } from '../../../context/games';
export default function Reject() {
const games = useContext(GamesContext);
const selectedGame = games.findGame({ uuid: games.proposal.selectedUUID });
if (selectedGame?.status !== 'GAME_PROPOSAL_WAIT_FOR_OPPONENT')
return (
<button className='Reject'>
Reject
</button>
)
}