@@ -28,11 +28,6 @@ export default function SignInForm() {
|
||||
|
||||
try {
|
||||
await login(email, password);
|
||||
|
||||
// CRITICAL: Wait for auth state to persist to localStorage before navigating
|
||||
// Increased to 500ms to ensure Zustand persist middleware completes
|
||||
await new Promise(resolve => setTimeout(resolve, 500));
|
||||
|
||||
// Redirect to the page user was trying to access, or home
|
||||
const from = (location.state as any)?.from?.pathname || "/";
|
||||
navigate(from, { replace: true });
|
||||
|
||||
Reference in New Issue
Block a user