From b1835987f99cca74f80047655da0461c188c7784 Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Wed, 9 Jul 2025 18:49:35 +0000 Subject: [PATCH] Ensure users are properly redirected after successfully logging in Fix: Handle response data from login API to correctly set user context. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 91318273-c764-4fd4-be04-bdc12c38af32 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/0715008c-7244-40f4-befc-26c014852236/ab880d72-1a34-4d36-b5be-9f44df85ed1a.jpg --- client/src/hooks/useAuth.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/hooks/useAuth.ts b/client/src/hooks/useAuth.ts index c2d6027..087d0c1 100644 --- a/client/src/hooks/useAuth.ts +++ b/client/src/hooks/useAuth.ts @@ -37,7 +37,8 @@ export function useAuth() { method: 'POST', body: JSON.stringify(credentials) }); - return response.json(); + const data = await response.json(); + return data; }, onSuccess: (data) => { setUser(data.user);