diff --git a/apps/languagesv2/languages-v2-web/package-lock.json b/apps/languagesv2/languages-v2-web/package-lock.json index 4214526d..846fcfd7 100644 --- a/apps/languagesv2/languages-v2-web/package-lock.json +++ b/apps/languagesv2/languages-v2-web/package-lock.json @@ -8,6 +8,7 @@ "name": "languages-v2", "version": "0.1.0", "dependencies": { + "@react-oauth/google": "^0.12.1", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", @@ -3526,6 +3527,16 @@ } } }, + "node_modules/@react-oauth/google": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@react-oauth/google/-/google-0.12.1.tgz", + "integrity": "sha512-qagsy22t+7UdkYAiT5ZhfM4StXi9PPNvw0zuwNmabrWyMKddczMtBIOARflbaIj+wHiQjnMAsZmzsUYuXeyoSg==", + "license": "MIT", + "peerDependencies": { + "react": ">=16.8.0", + "react-dom": ">=16.8.0" + } + }, "node_modules/@remix-run/router": { "version": "1.19.2", "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.19.2.tgz", diff --git a/apps/languagesv2/languages-v2-web/package.json b/apps/languagesv2/languages-v2-web/package.json index 5e3a8a68..feefda63 100644 --- a/apps/languagesv2/languages-v2-web/package.json +++ b/apps/languagesv2/languages-v2-web/package.json @@ -4,6 +4,7 @@ "homepage": "./", "private": true, "dependencies": { + "@react-oauth/google": "^0.12.1", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", diff --git a/apps/languagesv2/languages-v2-web/src/pages/Nav.tsx b/apps/languagesv2/languages-v2-web/src/pages/Nav.tsx index d79b52cb..25fb3ae9 100644 --- a/apps/languagesv2/languages-v2-web/src/pages/Nav.tsx +++ b/apps/languagesv2/languages-v2-web/src/pages/Nav.tsx @@ -1,20 +1,38 @@ import React from 'react'; import { Link } from 'react-router-dom'; +import { GoogleOAuthProvider, GoogleLogin } from '@react-oauth/google'; const Nav: React.FC = () => { + const handleGoogleLoginSuccess = (response: any) => { + console.log('Google login successful:', response); + // Handle the Google login response here, e.g., send the token to your backend for verification. + }; + + const handleGoogleLoginError = () => { + console.log('Google login failed'); + }; + return ( - + + + ); };