Skip to content

Commit

Permalink
Merge pull request #63 from RanitManik/dev
Browse files Browse the repository at this point in the history
fixes signup and signin pages do not handle the authentication loading state properly #62
  • Loading branch information
RanitManik authored Dec 15, 2024
2 parents b26c270 + 1a441f9 commit 540630c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/(auth)/sign-in/_components/signin-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ const SignInForm = () => {
toast.error(
"An unexpected error occurred. Please try again later.",
);
} finally {
setAuthLoading((prev) => ({ ...prev, credential: false }));
}
};

Expand All @@ -77,6 +79,8 @@ const SignInForm = () => {
toast.error(
"An unexpected error occurred. Please try again later.",
);
} finally {
setAuthLoading((prev) => ({ ...prev, credential: false }));
}
};

Expand Down
4 changes: 4 additions & 0 deletions app/(auth)/sign-up/_components/signup-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ const SignUpForm = () => {
toast.error(
"An unexpected error occurred. Please try again later.",
);
} finally {
setAuthLoading((prev) => ({ ...prev, credential: false }));
}
};

Expand All @@ -80,6 +82,8 @@ const SignUpForm = () => {
toast.error(
"An unexpected error occurred. Please try again later.",
);
} finally {
setAuthLoading((prev) => ({ ...prev, credential: false }));
}
};

Expand Down

0 comments on commit 540630c

Please sign in to comment.