import { auth, googleAuthProvider } from '../lib/firebase'; import { useContext } from 'react'; import { UserContext } from '../lib/context'; export default function EnterPage({ }) { const { user, username } = useContext(UserContext); // 1. user signed out // 2. user signed in, but missing username // 3. user signed in, has username return (
{user ? !username ? : : }
) } // Sign in with Google button function SignInButton() { const signInWithGoogle = async () => { await auth.signInWithPopup(googleAuthProvider); }; return ( ); } function SignOutButton() { return } function UsernameForm() { }