Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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/*
Expand Down
4 changes: 4 additions & 0 deletions plugins/google-search-console/src/auth.ts
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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)
}
Expand Down
4 changes: 2 additions & 2 deletions plugins/google-search-console/src/screens/GoogleLogin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ export default function GoogleLogin({ login, loading, hasError, errorMessage }:
</p>
</div>
</div>
<button type="button" onClick={login} disabled={loading}>
{loading ? "Loading..." : "Log In"}
<button type="button" onClick={login} disabled={loading} aria-label={loading ? "Logging in" : "Log in"}>
{loading ? <div className="framer-spinner" /> : "Log In"}
</button>
</div>
)
Expand Down
Loading