fix(auth): redirect to home instead of admin panel after login
This commit is contained in:
@@ -64,10 +64,8 @@ export function LoginForm({
|
|||||||
const nextParam = typeof window !== 'undefined' ? new URLSearchParams(window.location.search).get('next') : null;
|
const nextParam = typeof window !== 'undefined' ? new URLSearchParams(window.location.search).get('next') : null;
|
||||||
if (nextParam) {
|
if (nextParam) {
|
||||||
router.push(nextParam);
|
router.push(nextParam);
|
||||||
} else if (role === "admin") {
|
|
||||||
router.push("/admin/einstellungen");
|
|
||||||
} else {
|
} else {
|
||||||
router.push("/my-customers");
|
router.push("/");
|
||||||
}
|
}
|
||||||
}, [router]);
|
}, [router]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user