Skip to content

Commit

Permalink
Merge pull request #131 from Huilensolis/122-fix-log-in-form-is-loadi…
Browse files Browse the repository at this point in the history
…ng-even-when-the-request-has-ended

fix(app): 122 loading state on auth pages
  • Loading branch information
huilensolis authored Mar 16, 2024
2 parents 6c74462 + 03880d4 commit f1aeac1
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 f1aeac1

Please sign in to comment.