This commit is contained in:
IGNY8 VPS (Salman)
2025-12-08 18:22:10 +00:00
parent 33ad6768ec
commit 9f85ce4f52
11 changed files with 774 additions and 198 deletions

View File

@@ -28,6 +28,11 @@ 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 });