From 3d95250d59baddfa7b700bbf78116c6604fbcc10 Mon Sep 17 00:00:00 2001 From: Reviflow Bot Date: Sat, 31 Jan 2026 13:21:00 +0100 Subject: [PATCH] fix(auth): add logging and remove button animation for stability --- frontend/src/features/auth/LoginPage.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/frontend/src/features/auth/LoginPage.tsx b/frontend/src/features/auth/LoginPage.tsx index 28699ed..296e803 100644 --- a/frontend/src/features/auth/LoginPage.tsx +++ b/frontend/src/features/auth/LoginPage.tsx @@ -31,19 +31,27 @@ export const LoginPage = () => { }; const onSubmit = async (data: LoginForm) => { + console.log("DEBUG: Login form submitted", data); try { setGlobalError(null); const loginData = isParentMode ? { email: data.identifier, password: data.password } : { username: data.identifier, password: data.password }; + console.log("DEBUG: Calling login with", loginData); await login(loginData); + console.log("DEBUG: Login successful, navigating"); navigate('/'); } catch (err) { + console.error("DEBUG: Login error caught in component", err); setGlobalError("Identifiants invalides ou erreur de connexion"); } }; + const onError = (errors: any) => { + console.log("DEBUG: Form validation failed", errors); + }; + return (
@@ -78,7 +86,7 @@ export const LoginPage = () => {
-
+ {globalError && (
⚠️ {globalError} @@ -134,7 +142,7 @@ export const LoginPage = () => {