fix: check if user is left when onPitSelect

This commit is contained in:
Halit Aksoy 2022-10-08 16:08:30 +03:00
parent 77f63124dc
commit d5e7d33678

View File

@ -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;