()
| 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) { |
no test coverage detected