mirror of
https://github.com/zhigang1992/graphql-engine.git
synced 2026-05-28 23:31:46 +08:00
community: fix tic-tac-toe wrong turn bug (#2524)
This commit is contained in:
committed by
Shahidh K Muhammed
parent
88a1be4a04
commit
f3808bc9ba
@@ -89,7 +89,7 @@ const Play = ({boardId, client}) => {
|
||||
status= <h2 style={{color: isSelfWinner ? 'green' : 'red'}}>{winner}</h2>
|
||||
} else {
|
||||
if (board.turn === 'x') {
|
||||
status = <h2 style={{color: isSelfUser1 ? 'green' : '#565656'}}>{isSelfUser1 ? 'Your' : `${board.user1.name}'s`} turn</h2>
|
||||
status = <h2 style={{color: isSelfUser1 ? 'green' : '#565656'}}>{isSelfUser1 ? 'Your' : `${board.user2.name}'s`} turn</h2>
|
||||
} else {
|
||||
status = <h2 style={{color: !isSelfUser1 ? 'green' : '#565656'}}>{!isSelfUser1 ? 'Your' : `${board.user1.name}'s`} turn</h2>
|
||||
}
|
||||
@@ -111,7 +111,7 @@ const Play = ({boardId, client}) => {
|
||||
</div>
|
||||
<div className="display-flex-center">
|
||||
<div className="width-300 text-align-center">{opponent}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -120,4 +120,4 @@ const Play = ({boardId, client}) => {
|
||||
)
|
||||
};
|
||||
|
||||
export default withApollo(Play);
|
||||
export default withApollo(Play);
|
||||
|
||||
Reference in New Issue
Block a user