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 2c7d72d8ba
1 changed files with 2 additions and 1 deletions

View File

@ -35,7 +35,8 @@ export default function LoginForm() {
if (res.status === 200) {
toast({ title: "login successful!" })
setSubmitted(true)
await revalidate(redirect)
// await revalidate(redirect)
window.location.href = redirect
//BUG:the first time user logs in, page refreshes instead of redirecting
router.push(redirect)
} else {