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) { if (res.ok) {
router.push("/dashboard"); window.location.href = "/dashboard";
router.refresh();
} else { } else {
const data = await res.json(); const data = await res.json();
setError(data.error || "Login failed"); setError(data.error || "Login failed");