Skip to content

Commit 84e94fc

Browse files
committed
fix: Signup and login loading states
1 parent 063e711 commit 84e94fc

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

features/onboarding/hooks/use-login-with-passkey.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,9 @@ export function useLoginWithPasskey() {
5050
} catch (error) {
5151
logger.error("[login] Error during login process:", error);
5252
throw error;
53+
} finally {
54+
setIsLoggingIn(false);
5355
}
54-
// Don't set because the component will get unmounted anyway and we don't want the loading to stop
55-
// finally {
56-
// setIsLoggingIn(false);
57-
// }
5856
};
5957

6058
return { login, isLoggingIn };

features/onboarding/hooks/use-signup-with-passkey.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,9 @@ export function useSignupWithPasskey() {
5454
};
5555
} catch (error) {
5656
throw error;
57+
} finally {
58+
setIsSigningUp(false);
5759
}
58-
// Don't set because the component will get unmounted anyway and we don't want the loading to stop
59-
// finally {
60-
// setIsSigningUp(false);
61-
// }
6260
};
6361

6462
return { signup, isSigningUp: isSigningUp };

0 commit comments

Comments
 (0)