Fix login redirect with window.location

This commit is contained in:
Karol Głowacki
2026-01-09 19:29:27 +01:00
parent 06d874bab9
commit 119df05297

View File

@@ -26,8 +26,7 @@ export default function LoginPage() {
});
if (res.ok) {
router.push("/dashboard");
router.refresh();
window.location.href = "/dashboard";
} else {
const data = await res.json();
setError(data.error || "Login failed");