fix: harden booking and meeting flows
This commit is contained in:
@@ -4,6 +4,7 @@ import { useState, type FormEvent } from "react";
|
||||
import { useRouter, useSearchParams } from "next/navigation";
|
||||
import { ResendVerificationButton } from "./ResendVerificationButton";
|
||||
import { TextField, FormError } from "@/components/FormField";
|
||||
import { safeLoginRedirect } from "@/lib/auth/redirect";
|
||||
|
||||
export function LoginForm() {
|
||||
const router = useRouter();
|
||||
@@ -32,7 +33,7 @@ export function LoginForm() {
|
||||
setLoading(false);
|
||||
return;
|
||||
}
|
||||
router.push(searchParams.get("next") || "/konto");
|
||||
router.push(safeLoginRedirect(searchParams.get("next")));
|
||||
router.refresh();
|
||||
} catch {
|
||||
setError("Verbindung fehlgeschlagen. Bitte versuche es erneut.");
|
||||
|
||||
Reference in New Issue
Block a user