Skip to content

Commit

Permalink
fix: login redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
debendraoli committed Nov 26, 2024
1 parent d943a06 commit 42525f5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/app/(authentication)/login/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export default function Login({ callbackUrl }: { callbackUrl: string }) {
const dict = useDictionary()

const login = async (e: React.FormEvent<HTMLFormElement>) => {
e.preventDefault()
setSubmitting(true)
setError('')
try {
Expand Down Expand Up @@ -48,7 +47,7 @@ export default function Login({ callbackUrl }: { callbackUrl: string }) {
return
}
await new Promise((resolve) => setTimeout(resolve, 1000))
router.refresh()
router.push(url || '/')
} catch (err) {
if (err instanceof Error) {
setError(err.message)
Expand Down

0 comments on commit 42525f5

Please sign in to comment.