MCPcopy Create free account
hub / github.com/JamesAC42/hanbok / initializeGoogleSignIn

Function initializeGoogleSignIn

app/src/components/GoogleSignInButton.jsx:9–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7
8 useEffect(() => {
9 const initializeGoogleSignIn = () => {
10 if (typeof window !== 'undefined' && window.google && buttonRef.current) {
11 google.accounts.id.initialize({
12 client_id: '404846185478-rg9vrit25ke3kbkfbntcadb69c79mv2q.apps.googleusercontent.com',
13 callback: (response) => login(response)
14 });
15 google.accounts.id.renderButton(
16 buttonRef.current,
17 { theme: "outline", size: "large" }
18 );
19 google.accounts.id.prompt();
20 }
21 };
22
23 // Check if the Google script is already loaded
24 if (window.google) {

Callers 1

GoogleSignInButtonFunction · 0.85

Calls 2

loginFunction · 0.85
initializeMethod · 0.80

Tested by

no test coverage detected