fix: check if user is left when onPitSelect
This commit is contained in:
parent
77f63124dc
commit
d5e7d33678
@ -161,6 +161,10 @@ const GamePage: FunctionComponent<{
|
|||||||
if (!game || isSpectator || !userKey) {
|
if (!game || isSpectator || !userKey) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(userKeyWhoLeave) {
|
||||||
|
notyf.error(context.texts.GameEnded);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(game.mancalaGame.state === "ended") {
|
if(game.mancalaGame.state === "ended") {
|
||||||
notyf.error(context.texts.GameEnded);
|
notyf.error(context.texts.GameEnded);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user