Merge pull request #36 from jhalitaksoy/fix/check-user-left

fix: check if user is left when onPitSelect
This commit is contained in:
Halit Aksoy 2022-10-08 16:09:53 +03:00 committed by GitHub
commit e0c4d35b13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -161,6 +161,10 @@ const GamePage: FunctionComponent<{
if (!game || isSpectator || !userKey) {
return;
}
if(userKeyWhoLeave) {
notyf.error(context.texts.GameEnded);
return;
}
if(game.mancalaGame.state === "ended") {
notyf.error(context.texts.GameEnded);
return;