fix: redirect after login
Gitea/subman-nextjs/pipeline/head This commit looks good
Details
Gitea/subman-nextjs/pipeline/head This commit looks good
Details
This commit is contained in:
parent
da361e0f55
commit
a5c40a7982
|
@ -36,8 +36,7 @@ export default function LoginForm() {
|
||||||
toast({ title: "login successful!" })
|
toast({ title: "login successful!" })
|
||||||
setSubmitted(true)
|
setSubmitted(true)
|
||||||
await revalidate(redirect)
|
await revalidate(redirect)
|
||||||
//BUG:the first time user logs in, page refreshes instead of redirecting
|
window.location.href = redirect
|
||||||
router.push(redirect)
|
|
||||||
} else {
|
} else {
|
||||||
toast({ title: "login failed!" })
|
toast({ title: "login failed!" })
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue