diff --git a/.gitignore b/.gitignore index 4ed5387a4..b0ca9eb65 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ dist node_modules npm-debug.log* plugin.zip +.env # Yarn v2 with Zero Installs (https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored) .yarn/* diff --git a/plugins/google-search-console/src/auth.ts b/plugins/google-search-console/src/auth.ts index e67451683..1416f118e 100644 --- a/plugins/google-search-console/src/auth.ts +++ b/plugins/google-search-console/src/auth.ts @@ -1,3 +1,4 @@ +import { framer } from "framer-plugin" import { createContext, useCallback, useEffect, useRef, useState } from "react" import * as v from "valibot" import { AuthorizeSchema, type GoogleToken, GoogleTokenSchema } from "./types" @@ -83,6 +84,9 @@ export function useGoogleToken() { // Update the component state. setTokens(tokens) + } catch (error) { + const errorMessage = error instanceof Error ? error.message : "An unknown error occurred" + framer.notify(errorMessage, { variant: "error" }) } finally { setLoading(false) } diff --git a/plugins/google-search-console/src/screens/GoogleLogin.tsx b/plugins/google-search-console/src/screens/GoogleLogin.tsx index f36d7e532..f6262bd94 100644 --- a/plugins/google-search-console/src/screens/GoogleLogin.tsx +++ b/plugins/google-search-console/src/screens/GoogleLogin.tsx @@ -22,8 +22,8 @@ export default function GoogleLogin({ login, loading, hasError, errorMessage }:
-