fix: redirect after login
Gitea/subman-nextjs/pipeline/head This commit looks good Details

This commit is contained in:
andrzej 2024-10-04 18:27:39 +02:00
parent da361e0f55
commit a5c40a7982
1 changed files with 1 additions and 2 deletions

View File

@ -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!" })
} }