mirror of
https://github.com/AeThex-Corporation/AeThex-OS.git
synced 2026-04-17 22:27:19 +00:00
Add logging to track login attempts and errors
Adds console logs to the client-side login component to capture login attempt details, success messages, and any associated errors for debugging purposes. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 279f1558-c0e3-40e4-8217-be7e9f4c6eca Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 9b872228-6ed3-44f3-b8e4-44379b646736 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/b984cb14-1d19-4944-922b-bc79e821ed35/279f1558-c0e3-40e4-8217-be7e9f4c6eca/onpHYqC Replit-Helium-Checkpoint-Created: true
This commit is contained in:
parent
8f56601ce2
commit
8de4a46ee7
1 changed files with 3 additions and 0 deletions
|
|
@ -17,14 +17,17 @@ export default function Login() {
|
|||
e.preventDefault();
|
||||
if (isLoading) return;
|
||||
|
||||
console.log('Login attempt:', email);
|
||||
setError("");
|
||||
setIsLoading(true);
|
||||
|
||||
try {
|
||||
await login(email, password);
|
||||
console.log('Login success');
|
||||
await new Promise(resolve => setTimeout(resolve, 100));
|
||||
setLocation("/admin");
|
||||
} catch (err: any) {
|
||||
console.error('Login error:', err);
|
||||
setError(err.message || "Login failed");
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
|
|
|
|||
Loading…
Reference in a new issue