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("/"); } }); };