diff --git a/src/features/authentication/components/AuthenticationSteps/GoogleAuthenticationV2.tsx b/src/features/authentication/components/AuthenticationSteps/GoogleAuthenticationV2.tsx index 44dd66e..2182a73 100644 --- a/src/features/authentication/components/AuthenticationSteps/GoogleAuthenticationV2.tsx +++ b/src/features/authentication/components/AuthenticationSteps/GoogleAuthenticationV2.tsx @@ -10,9 +10,10 @@ import { } from '../../api/identityAPI'; import { loginOrSignUpWithGoogle } from '../../api/authorizationAPI'; import { useApi } from '@/hooks/useApi'; -import { useToast } from '@rkheftan/harmony-ui'; +import { Icon, useToast } from '@rkheftan/harmony-ui'; import { useTranslation } from 'react-i18next'; import { Box, Button } from '@mui/material'; +import { Google } from 'iconsax-react'; interface GoogleAuthenticationV2Props { authFactory: AuthFactory; @@ -28,7 +29,9 @@ export const GoogleAuthenticationV2 = ({ }: GoogleAuthenticationV2Props) => { const toast = useToast(); const { t } = useTranslation('authentication'); - const { execute: loginWithGoogleCall } = useApi(loginOrSignUpWithGoogle); + const { execute: loginWithGoogleCall, loading } = useApi( + loginOrSignUpWithGoogle, + ); const [isGoogleLoaded, setIsGoogleLoaded] = useState(false); const googleBtnRef = useRef(null); @@ -110,6 +113,15 @@ export const GoogleAuthenticationV2 = ({ } }, []); + const handleGoogleLogin = () => { + if (googleBtnRef.current) { + const googleCustomRenderedDivs = + googleBtnRef.current.querySelectorAll('div'); + + googleCustomRenderedDivs.forEach((b) => b.click()); + } + }; + return ( <> - {!isGoogleLoaded && +
);