Skip to content

Latest commit

 

History

History

app

Web Application

Web application package powered by Vite, React, React Router, Recoil, and Material UI.

How to Access the Logged-In User?

import { useCurrentUser } from "../state/firebase.js";

function Example(): JSX.Element {
  const me = useCurrentUser();
  return <Box>Hello, {me?.name}!</Box>;
}

How to Sign In / Sign Out?

import { useAuth } from "../state/firebase.js";

function Example(): JSX.Element {
  const auth = useAuth();
  return (
    <Box>
      <Button onClick={auth.signIn}>Sign In</Button>
      <Button onClick={auth.signOut}>Sign Out</Button>
    </Box>
  );
}