From 256c4e303b8813aa51f25cd0f106ea150b11b9c0 Mon Sep 17 00:00:00 2001 From: fcarraUniSa Date: Tue, 17 Feb 2026 10:09:12 +0100 Subject: [PATCH] Update AuthScreen.tsx --- components/AuthScreen.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/AuthScreen.tsx b/components/AuthScreen.tsx index f68718b..4762699 100644 --- a/components/AuthScreen.tsx +++ b/components/AuthScreen.tsx @@ -4,8 +4,8 @@ import { Lock, User, Mail, Briefcase, ArrowRight, AlertCircle } from 'lucide-rea interface AuthScreenProps { settings: AppSettings; - onClientLogin: (email: string, password: string) => boolean; - onAgentLogin: (email: string, password: string) => boolean; + onClientLogin: (email: string, password: string) => Promise; + onAgentLogin: (email: string, password: string) => Promise; onClientRegister: (name: string, email: string, password: string, company: string) => void; } @@ -20,19 +20,19 @@ export const AuthScreen: React.FC = ({ settings, onClientLogin, const [name, setName] = useState(''); const [company, setCompany] = useState(''); - const handleSubmit = (e: React.FormEvent) => { + const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); setError(null); let success = false; if (activeTab === 'agent') { - success = onAgentLogin(email, password); + success = await onAgentLogin(email, password); } else { if (isRegistering) { onClientRegister(name, email, password, company); success = true; // Assume success for mock registration } else { - success = onClientLogin(email, password); + success = await onClientLogin(email, password); } }