import { useEffect } from 'react' import { useNavigate } from "react-router-dom"; import { GoogleLogin, GoogleOAuthProvider } from '@react-oauth/google'; export default function Login(props: any) { const navigate = useNavigate(); useEffect(() => { props.supabase.auth.getSession().then(({ data: { session } }: any) => { props.setSession(session) console.log("LOGIN SESSION", session) }) const { data: { subscription }, } = props.supabase.auth.onAuthStateChange((_event: any, session: any) => { props.setSession(session) console.log("SESSION CHANGE", session) }) return () => subscription.unsubscribe() }, [props.supabase]) useEffect(() => { if (props.session) { navigate('/') } }, [props.session]) //min-w-full broke the container return ( <>

fs-tracer

Hello!
Continue with { await props.supabase.auth.signInWithIdToken({ provider: 'google', token: credentialResponse.credential, }) }} onError={() => { console.log('Login Failed'); }} width={7777} size={"large"} type={"icon"} />
) }