From 0d62f08e774d69a8a3380b32399062d5e519a299 Mon Sep 17 00:00:00 2001 From: pavel444-byte Date: Sat, 31 Oct 2026 13:56:01 +0500 Subject: [PATCH] Fix login return routes and recovery feedback --- components/AccountSettings.tsx | 5 +++-- components/MapCommunity.tsx | 5 ++++- components/StartGame.tsx | 6 +++++- components/TournamentLobby.tsx | 14 ++++++++++++-- shared/account.ts | 7 +++++++ tests/account.test.ts | 17 ++++++++++++++++- 6 files changed, 47 insertions(+), 7 deletions(-) diff --git a/components/AccountSettings.tsx b/components/AccountSettings.tsx index 219cecc..c988c7d 100644 --- a/components/AccountSettings.tsx +++ b/components/AccountSettings.tsx @@ -158,6 +158,7 @@ export function AccountSettings({ async function recover() { setSending(true); setRecoveryError(""); + setRecoveryMessage(""); try { const data = await api<{ message: string }>("auth", { action: "recover", @@ -344,12 +345,12 @@ export function AccountSettings({ {recoveryMessage && (

- {recoveryMessage} + {t(recoveryMessage)}

)} {recoveryError && (

- {recoveryError} + {t(recoveryError)}

)} diff --git a/components/MapCommunity.tsx b/components/MapCommunity.tsx index cc6e29a..c314f1d 100644 --- a/components/MapCommunity.tsx +++ b/components/MapCommunity.tsx @@ -145,7 +145,10 @@ export function MapCommunity({ {!data.viewer && (

- + {t("Sign in to react, comment, or report.")}

diff --git a/components/StartGame.tsx b/components/StartGame.tsx index e2cfc09..e58613b 100644 --- a/components/StartGame.tsx +++ b/components/StartGame.tsx @@ -338,7 +338,11 @@ export function StartGame({ ) : (

{t("Log in to create a multiplayer room")}{" "} - {t("Log in")} + + {t("Log in")} +

)}