From 985a41208022dc85d54bbfbd978cfb681e5d9a1b Mon Sep 17 00:00:00 2001 From: Srayash <146334722+Srayash@users.noreply.github.com> Date: Mon, 28 Oct 2024 18:06:55 +0530 Subject: [PATCH] Bug Fix: OAuth Button Loader State Not Reset on Browser Back Navigation. (#2568) --- apps/dashboard/app/auth/sign-in/oauth-signin.tsx | 1 + apps/dashboard/app/auth/sign-up/oauth-signup.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/apps/dashboard/app/auth/sign-in/oauth-signin.tsx b/apps/dashboard/app/auth/sign-in/oauth-signin.tsx index 611e103b5a..a51d6c6267 100644 --- a/apps/dashboard/app/auth/sign-in/oauth-signin.tsx +++ b/apps/dashboard/app/auth/sign-in/oauth-signin.tsx @@ -24,6 +24,7 @@ export const OAuthSignIn: React.FC = () => { redirectUrl: "/auth/sso-callback", redirectUrlComplete: "/apis", }); + setIsLoading(null); setLastUsed(provider === "oauth_google" ? "google" : "github"); } catch (err) { console.error(err); diff --git a/apps/dashboard/app/auth/sign-up/oauth-signup.tsx b/apps/dashboard/app/auth/sign-up/oauth-signup.tsx index f0d47d7841..6129f2ee50 100644 --- a/apps/dashboard/app/auth/sign-up/oauth-signup.tsx +++ b/apps/dashboard/app/auth/sign-up/oauth-signup.tsx @@ -22,6 +22,7 @@ export function OAuthSignUp() { redirectUrl: "/auth/sso-callback", redirectUrlComplete: "/new", }); + setIsLoading(null); } catch (cause) { console.error(cause); setIsLoading(null);