Skip to content

Commit 7674a9b

Browse files
committed
adding login redirection
1 parent 7d01917 commit 7674a9b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/views/login/login.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ const LoginComponent = () => {
5353
if (signInResponse?.error) {
5454
setErrorMessage(signInResponse.error)
5555
setLoading(false)
56+
} else {
57+
setSuccessMessage('Login Successful')
58+
setLoading(false)
59+
router.push('/')
5660
}
5761
} catch (error: any) {
5862
console.error('Error initiating cognito login:', error);

0 commit comments

Comments
 (0)