From 03880d40098307fc5d6186f63f5ddd30a35f41ca Mon Sep 17 00:00:00 2001 From: Huilensolis Date: Sat, 16 Mar 2024 11:47:11 -0300 Subject: [PATCH] fix(app): 122 loading state on auth pages --- src/app/(site)/(guest)/auth/log-in/page.tsx | 2 ++ src/app/(site)/(guest)/auth/sign-up/page.tsx | 13 ++----------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/app/(site)/(guest)/auth/log-in/page.tsx b/src/app/(site)/(guest)/auth/log-in/page.tsx index 876c9a3..625cfb4 100644 --- a/src/app/(site)/(guest)/auth/log-in/page.tsx +++ b/src/app/(site)/(guest)/auth/log-in/page.tsx @@ -31,12 +31,14 @@ export default function LogInPage() { const handleLogIn: SubmitHandler = async (data) => { try { setIsLoading(true); + const { error } = await supabase.auth.signInWithPassword({ password: data.password, email: data.email, }); if (error) { setErrorLogginIn(true); + setIsLoading(false); return; } setErrorLogginIn(false); diff --git a/src/app/(site)/(guest)/auth/sign-up/page.tsx b/src/app/(site)/(guest)/auth/sign-up/page.tsx index 3047657..1177bf3 100644 --- a/src/app/(site)/(guest)/auth/sign-up/page.tsx +++ b/src/app/(site)/(guest)/auth/sign-up/page.tsx @@ -136,18 +136,9 @@ export default function SingUpPage() { setWasAnErrorSendingEmail(false)} - > -
- - If the error persist, please contact us on - - X/Twitter - - -
-
+ /> )}