1
0
mirror of https://github.com/mizanxali/uno-online synced 2024-11-05 02:35:26 +00:00
This commit is contained in:
Mizanali Panjwani 2021-02-23 19:25:40 +05:30
parent 0d6a5c166c
commit 9cde81b6f9

View File

@ -700,7 +700,8 @@ const Game = (props) => {
}
return (
(!roomFull) ? <>
<>
{(!roomFull) ? <>
<h1>Game Code: {room}</h1>
{users.length===2 ? <>
@ -729,7 +730,7 @@ const Game = (props) => {
/> }
</div>
<hr />
<div className='player2Deck' style={turn === 'Player 1' ? {pointerEvents: 'none'} : null}>
<div className='player2Deck' style={{pointerEvents: 'none'}}>
{player2Deck.map((item) => (
<img
onClick={() => onCardPlayedHandler(item)}
@ -741,7 +742,7 @@ const Game = (props) => {
</div> </> }
{currentUser === 'Player 2' && <>
<div className='player1Deck' style={turn === 'Player 1' ? null : {pointerEvents: 'none'}}>
<div className='player1Deck' style={{pointerEvents: 'none'}}>
{player1Deck.map((item) => (
<img
onClick={() => onCardPlayedHandler(item)}
@ -771,13 +772,15 @@ const Game = (props) => {
<button onClick={onCardDrawnHandler}>DRAW CARD</button>
</div> </> }
<hr />
<a href='/'>Home</a>
</div> }
</> : <h1>Waiting for other player</h1> }
</> : <h1>Room full</h1>
</> : <h1>Room full</h1> }
<hr />
<a href='/'>Home</a>
</>
)
}