diff --git a/apps/app/components/account/google-login.tsx b/apps/app/components/account/google-login.tsx index 67a77f2e4..c814c658c 100644 --- a/apps/app/components/account/google-login.tsx +++ b/apps/app/components/account/google-login.tsx @@ -20,17 +20,21 @@ export const GoogleLoginButton: FC = ({ handleSignIn }) => { callback: handleSignIn, }); - window?.google?.accounts.id.renderButton( - googleSignInButton.current, - { - type: "standard", - theme: "outline", - size: "large", - logo_alignment: "center", - width: "360", - text: "signin_with", - } as GsiButtonConfiguration // customization attributes - ); + try { + window?.google?.accounts.id.renderButton( + googleSignInButton.current, + { + type: "standard", + theme: "outline", + size: "large", + logo_alignment: "center", + width: 360, + text: "signin_with", + } as GsiButtonConfiguration // customization attributes + ); + } catch (err) { + console.log(err); + } window?.google?.accounts.id.prompt(); // also display the One Tap dialog @@ -50,7 +54,7 @@ export const GoogleLoginButton: FC = ({ handleSignIn }) => { <>