diff --git a/src/onboarding/Login.jsx b/src/onboarding/Login.jsx
index 4dac4e7a..c34032ff 100644
--- a/src/onboarding/Login.jsx
+++ b/src/onboarding/Login.jsx
@@ -1,9 +1,9 @@
import { Button, Input } from '@nextui-org/react';
-import { Link, useNavigate } from 'react-router-dom';
+import { Link, Navigate, useNavigate } from 'react-router-dom';
+import { useSignIn, useUser } from '@clerk/clerk-react';
import { reduceState } from '../shared/helpers';
import { useForm } from 'react-hook-form';
import { useMutativeReducer } from 'use-mutative';
-import { useSignIn } from '@clerk/clerk-react';
export default function Login() {
const {
@@ -14,6 +14,7 @@ export default function Login() {
} = useForm();
const { isLoaded: isClerkLoaded, signIn, setActive } = useSignIn();
+ const { isSignedIn } = useUser();
const [state, dispatch] = useMutativeReducer(reduceState, {
isLoading: false
});
@@ -62,6 +63,10 @@ export default function Login() {
// });
// };
+ if (isSignedIn) {
+ return