diff options
author | Anthony Wang | 2021-05-07 10:30:01 -0500 |
---|---|---|
committer | Anthony Wang | 2021-05-07 10:30:01 -0500 |
commit | 6d0d14e385a9babb52db0564602bca90b684f432 (patch) | |
tree | cc22cb1ff4beba31bbdc60e1ced5843ba181e0e2 /front | |
parent | f43b45d89af841a5c9e9ae66e0c0333730c15c64 (diff) |
Fix a lot of typos
Diffstat (limited to 'front')
-rw-r--r-- | front/pages/index.tsx | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/front/pages/index.tsx b/front/pages/index.tsx index 2a15c6c..1d8918c 100644 --- a/front/pages/index.tsx +++ b/front/pages/index.tsx @@ -123,29 +123,29 @@ export default function Game() { </ul> {`Rearrange your card stack from top to bottom!`} <div> - <p>Your cards:</p> - {gameState.cards.map((card, i) => ( - <label key={card.rank+' '+card.suit}> - <button - onClick={() => { - const tmp = gameState.cards[i]; - gameState.cards[i] = gameState.cards[i-1]; - gameState.cards[i-1] = tmp; - }} - disabled={i === 0} - > - Move left - </button> - {rankStrs[card.rank]+' '+suitChars[card.suit]} - </label> - ))} - <button - onClick={() => socket.emit('prepare', gameState.cards)} - //disabled={username !== gameState.playerTurn || !canPlay(gameState.lastPlayed, selectedCards)} - > - I'm ready! - </button> - </div> + <p>Your cards:</p> + {gameState.cards.map((card, i) => ( + <label key={card.rank+' '+card.suit+' '}> + <button + onClick={() => { + const tmp = gameState.cards[i]; + gameState.cards[i] = gameState.cards[i-1]; + gameState.cards[i-1] = tmp; + }} + disabled={i === 0} + > + Move left + </button> + {rankStrs[card.rank]+' '+suitChars[card.suit]+' '} + </label> + ))} + <button + onClick={() => socket.emit('prepare', gameState.cards)} + //disabled={username !== gameState.playerTurn || !canPlay(gameState.lastPlayed, selectedCards)} + > + I'm ready! + </button> + </div> </> ); } @@ -170,7 +170,6 @@ export default function Game() { </div> {`It's ${gameState.playerTurn}'s turn!`} <div> - <p>Your cards:</p> <input type="text" placeholder="Claim a number greater than the last claimed number..." @@ -258,7 +257,7 @@ export default function Game() { </label> ))} <button - onClick={() => socket.emit('turn', selectedCards)} + onClick={() => socket.emit('giveup', selectedCards[0])} disabled={username !== gameState.playerTurn || selectedCards.length !== 1} > Give up this card! |