Fix login redirect with window.location
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user