From 08fc5c8b7b08ad94d38e54b990ec2e2625613422 Mon Sep 17 00:00:00 2001 From: Halit Aksoy Date: Fri, 16 Oct 2026 09:26:02 +0300 Subject: [PATCH] fix(frontend): confirm leaving a game with Yes and go home The dialog's buttons were in the wrong order and its result was read inverted; leaving now needs Yes and returns to the home page. --- apps/frontend/src/routes/GamePage.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/frontend/src/routes/GamePage.tsx b/apps/frontend/src/routes/GamePage.tsx index 2fda3da..e0e776e 100644 --- a/apps/frontend/src/routes/GamePage.tsx +++ b/apps/frontend/src/routes/GamePage.tsx @@ -182,12 +182,13 @@ const GamePage: FunctionComponent<{ swal({ title: t("AreYouSureToLeaveGame"), icon: "warning", - buttons: [t("Yes"), t("Cancel")], + buttons: [t("Cancel"), t("Yes")], dangerMode: true, }) - .then((cancel) => { - if (!cancel) { + .then((confirm) => { + if (confirm) { context.rtmt.sendMessage(channel_leave_game, {}); + navigate("/"); } }); };