15 lines
441 B
JavaScript
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>
|
|
)
|
|
} |