fix(auth): redirect to home instead of admin panel after login

This commit is contained in:
DanielS
2026-08-18 16:26:35 +02:00
parent 8588eda3c9
commit 8f3d6e5569

View File

@@ -64,10 +64,8 @@ export function LoginForm({
const nextParam = typeof window !== 'undefined' ? new URLSearchParams(window.location.search).get('next') : null;
if (nextParam) {
router.push(nextParam);
} else if (role === "admin") {
router.push("/admin/einstellungen");
} else {
router.push("/my-customers");
router.push("/");
}
}, [router]);