From d5e7d33678f9807d3c206ccafcaf5c38812e0347 Mon Sep 17 00:00:00 2001 From: Halit Aksoy Date: Sat, 8 Oct 2022 16:08:30 +0300 Subject: [PATCH] fix: check if user is left when onPitSelect --- src/routes/GamePage.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/routes/GamePage.tsx b/src/routes/GamePage.tsx index 3758c89..c39c9e2 100644 --- a/src/routes/GamePage.tsx +++ b/src/routes/GamePage.tsx @@ -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;