Skip to content

Commit

Permalink
fix(app): 122 loading state on auth pages
Browse files Browse the repository at this point in the history
  • Loading branch information
huilensolis committed Mar 16, 2024
1 parent 6c74462 commit 03880d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
2 changes: 2 additions & 0 deletions src/app/(site)/(guest)/auth/log-in/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@ export default function LogInPage() {
const handleLogIn: SubmitHandler<AuthFormAreas> = 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);
Expand Down
13 changes: 2 additions & 11 deletions src/app/(site)/(guest)/auth/sign-up/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,18 +136,9 @@ export default function SingUpPage() {
<Alert
type="error"
title="Error"
description="There was an error sending the confirmation email, try again"
description="There was an error sending the confirmation email, please try again later"
onClose={() => setWasAnErrorSendingEmail(false)}
>
<div>
<span className="text-neutral-600 dark:text-neutral-400">
If the error persist, please contact us on
<a href="https://www.x.com/picturaasdfasd" target="_blank">
X/Twitter
</a>
</span>
</div>
</Alert>
/>
)}
</form>
</section>
Expand Down

0 comments on commit 03880d4

Please sign in to comment.